diff --git a/tests/install-darwin.sh b/tests/install-darwin.sh index 9084d92c2..b553f7105 100755 --- a/tests/install-darwin.sh +++ b/tests/install-darwin.sh @@ -20,8 +20,10 @@ cleanup() { done for file in ~/.bash_profile ~/.bash_login ~/.profile ~/.zshenv ~/.zprofile ~/.zshrc ~/.zlogin; do - cat "$file" | grep -v nix-profile > "$file.next" - mv "$file.next" "$file" + if [ -e "$file" ]; then + cat "$file" | grep -v nix-profile > "$file.next" + mv "$file.next" "$file" + fi done