We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents d2963c2 + 20cd625 commit 783ddd8Copy full SHA for 783ddd8
ci/run-docker.sh
@@ -5,6 +5,13 @@
5
6
set -ex
7
8
+# Default to assuming the CARGO_HOME is one directory up (to account for a `bin`
9
+# subdir) from where the `cargo` binary in `$PATH` lives.
10
+DEFAULT_CARGO_HOME="$(dirname "$(dirname "$(command -v cargo)")")"
11
+# If the CARGO_HOME env var is already set, use that. If it isn't set use the
12
+# default.
13
+CARGO_HOME="${CARGO_HOME:-$DEFAULT_CARGO_HOME}"
14
+
15
echo "${HOME}"
16
pwd
17
@@ -26,7 +33,7 @@ run() {
26
33
--env LIBC_CI \
27
34
--env CARGO_HOME=/cargo \
28
35
--env CARGO_TARGET_DIR=/checkout/target \
29
- --volume "$(dirname "$(dirname "$(command -v cargo)")")":/cargo \
36
+ --volume "$CARGO_HOME":/cargo \
30
37
--volume "$(rustc --print sysroot)":/rust:ro \
31
38
--volume "$(pwd)":/checkout:ro \
32
39
--volume "$(pwd)"/target:/checkout/target \
0 commit comments