diff options
Diffstat (limited to 'tests/install-darwin.sh')
-rwxr-xr-x | tests/install-darwin.sh | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/install-darwin.sh b/tests/install-darwin.sh index 9084d92c23e1..b553f710527d 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 |