File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 5
5
6
6
set -ex
7
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
+
8
15
echo " ${HOME} "
9
16
pwd
10
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 \
You can’t perform that action at this time.
0 commit comments