diff options
author | Graham Christensen <graham@grahamc.com> | 2017-07-12 20:31:33 -0400 |
---|---|---|
committer | Graham Christensen <graham@grahamc.com> | 2017-07-14 12:11:17 -0400 |
commit | 3839dda2ecc0444db1469757b4a3e1f4f776fe9d (patch) | |
tree | 647d68e329d252eefaccfe85d46f979d252f385b | |
parent | 92ca93528fe7d29b8909a89b0f9c7a9e23627fd5 (diff) |
Only clean if the file exists
-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 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 |