diff --git a/pkgs/development/compilers/rust/setup-hook.sh b/pkgs/development/compilers/rust/setup-hook.sh index 7078ec7060b..5d4eb642fec 100644 --- a/pkgs/development/compilers/rust/setup-hook.sh +++ b/pkgs/development/compilers/rust/setup-hook.sh @@ -1,4 +1,4 @@ # Fix 'failed to open: /homeless-shelter/.cargo/.package-cache' in rust 1.36. -if [[ -z $IN_NIX_SHELL && -z $CARGO_HOME ]]; then +if [[ -z ${IN_NIX_SHELL-} && -z ${CARGO_HOME-} ]]; then export CARGO_HOME=$TMPDIR fi