diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2003-07-20T21·11+0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2003-07-20T21·11+0000 |
commit | 7984cfc7c18c85c5db42c5c7d57927b12c846ce0 (patch) | |
tree | a728a7500892e4de089c090538cb8fd34e4a1ffa /scripts/nix-switch.in | |
parent | 667a6afb9dabcb3e5c851b910705b7eb1c87c9b6 (diff) |
* Argh, another short-write problem. Added wrappers around
read()/write() to fix this once and for all.
Diffstat (limited to 'scripts/nix-switch.in')
-rwxr-xr-x | scripts/nix-switch.in | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/scripts/nix-switch.in b/scripts/nix-switch.in index 55305418c7f6..2ccb6b4e5786 100755 --- a/scripts/nix-switch.in +++ b/scripts/nix-switch.in @@ -15,6 +15,9 @@ $hash || die "no package hash specified"; my $linkdir = "@localstatedir@/nix/links"; # Build the specified package, and all its dependencies. +system "nix -ih $hash"; +if ($?) { die "`nix -ih' failed"; } + my $pkgdir = `nix -qph $hash`; if ($?) { die "`nix -qph' failed"; } chomp $pkgdir; |