aboutsummaryrefslogtreecommitdiff
path: root/scripts/nix-switch
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/nix-switch')
-rwxr-xr-xscripts/nix-switch4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/nix-switch b/scripts/nix-switch
index 8dea38564..570f7e9e9 100755
--- a/scripts/nix-switch
+++ b/scripts/nix-switch
@@ -61,6 +61,6 @@ rename($tmplink, $current) or die "cannot rename $tmplink";
if (!$keep && defined $oldlink) {
print "deleting old $oldlink\n";
- unlink $tmplink || print "cannot delete $tmplink";
- unlink "$tmplink.hash" || print "cannot delete $tmplink.hash";
+ unlink($oldlink) == 1 || print "cannot delete $oldlink\n";
+ unlink("$oldlink.hash") == 1 || print "cannot delete $oldlink.hash\n";
}