about summary refs log tree commit diff
path: root/scripts/nix-build.in
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2006-08-04T11·51+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2006-08-04T11·51+0000
commitf4a502a09a8f4dd0f4ac393798e66f0df03937d5 (patch)
treebf22cefafd681f5bd959fad8c7b3d47179706fce /scripts/nix-build.in
parent981eff065b8c5b8833ecb81e29b57944b493be01 (diff)
* Use old-school pipe opens; the new style is Perl >= 5.8.0.
Diffstat (limited to 'scripts/nix-build.in')
-rw-r--r--scripts/nix-build.in5
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/nix-build.in b/scripts/nix-build.in
index 1357b7a1297d..2bea463d3ee5 100644
--- a/scripts/nix-build.in
+++ b/scripts/nix-build.in
@@ -110,9 +110,10 @@ foreach my $expr (@exprs) {
 
     # Instantiate.
     my @drvPaths;
-    my $pid = open DRVPATHS, "-|", "@bindir@/nix-instantiate", "--add-root", $drvLink, "--indirect", @instArgs, $expr;
+    # !!! would prefer the perl 5.8.0 pipe open feature here.
+    my $pid = open(DRVPATHS, "-|") || exec "@bindir@/nix-instantiate", "--add-root", $drvLink, "--indirect", @instArgs, $expr;
     while (<DRVPATHS>) {chomp; push @drvPaths, $_;}
-    close DRVPATHS or die;
+    close DRVPATHS or exit 1;
 
     foreach my $drvPath (@drvPaths) {
         my $target = readlink $drvPath;