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 55
66set -ex
77
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+
815echo " ${HOME} "
916pwd
1017
@@ -26,7 +33,7 @@ run() {
2633 --env LIBC_CI \
2734 --env CARGO_HOME=/cargo \
2835 --env CARGO_TARGET_DIR=/checkout/target \
29- --volume " $( dirname " $( dirname " $( command -v cargo ) " ) " ) " :/cargo \
36+ --volume " $CARGO_HOME " :/cargo \
3037 --volume " $( rustc --print sysroot) " :/rust:ro \
3138 --volume " $( pwd) " :/checkout:ro \
3239 --volume " $( pwd) " /target:/checkout/target \
You can’t perform that action at this time.
0 commit comments