about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2006-10-19T17·30+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2006-10-19T17·30+0000
commitb3d3700e113c584329473dbfbd3149c9ef8566e8 (patch)
treed1a4f5109c9b3a2f93bc5d9cf492c4de08f4dd1a
parent6a67556f7192108d612560992e97a14b0fe16a22 (diff)
* nix-build: check the exit status of `nix-store -r'.
-rw-r--r--scripts/nix-build.in10
1 files changed, 6 insertions, 4 deletions
diff --git a/scripts/nix-build.in b/scripts/nix-build.in
index 2bea463d3ee5..dc7dc6e85725 100644
--- a/scripts/nix-build.in
+++ b/scripts/nix-build.in
@@ -121,12 +121,14 @@ foreach my $expr (@exprs) {
     }
 
     # Build.
-    my $outPaths = `@bindir@/nix-store --add-root "$outLink" --indirect -rv @buildArgs @drvPaths`;
-    my @outPaths = split ' ', $outPaths;
-    
+    my @outPaths;
+    $pid = open(OUTPATHS, "-|") || exec "@bindir@/nix-store", "--add-root", $outLink, "--indirect", "-rv",
+        @buildArgs, @drvPaths;
+    while (<OUTPATHS>) {chomp; push @outPaths, $_;}
+    close OUTPATHS or exit 1;
+
     foreach my $outPath (@outPaths) {
         my $target = readlink $outPath;
         print "$target\n";
     }
-
 }