about summary refs log tree commit diff
path: root/scripts/nix-build.in
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2007-06-11T11·36+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2007-06-11T11·36+0000
commit9bff7ad7287dafff1e06f3c3db6a5ec295d7c152 (patch)
treeb535975cb1bbcf0ab3fbc005dfce5060dba22dbd /scripts/nix-build.in
parentf3ebd03bb17533806d38fe871200b1dc4688acdc (diff)
* Check against creation of GC roots in the store. Those roots don't
  work, because findRoots() stops when it encounters a symlink to the
  store.  And of course the store is supposed to be read-only.

Diffstat (limited to 'scripts/nix-build.in')
-rw-r--r--scripts/nix-build.in4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/nix-build.in b/scripts/nix-build.in
index 08201f85761d..bce4a80078f9 100644
--- a/scripts/nix-build.in
+++ b/scripts/nix-build.in
@@ -122,7 +122,7 @@ foreach my $expr (@exprs) {
     close DRVPATHS or exit 1;
 
     foreach my $drvPath (@drvPaths) {
-        my $target = readlink $drvPath;
+        my $target = readlink $drvPath or die "cannot read symlink `$drvPath'";
         print STDERR "store derivation is $target\n";
     }
 
@@ -134,7 +134,7 @@ foreach my $expr (@exprs) {
     close OUTPATHS or exit 1;
 
     foreach my $outPath (@outPaths) {
-        my $target = readlink $outPath;
+        my $target = readlink $outPath or die "cannot read symlink `$outPath'";
         print "$target\n";
     }
 }