rust: Allow IN_NIX_SHELL to be undefined

This commit is contained in:
John Ericson 2019-11-01 11:09:02 -04:00
parent b7f4bda282
commit 45e5e68c53

View file

@ -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