diff options
Diffstat (limited to 'scripts/nix-switch')
-rwxr-xr-x | scripts/nix-switch | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/nix-switch b/scripts/nix-switch index 8dea3856418b..570f7e9e9227 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"; } |