From f4a502a09a8f4dd0f4ac393798e66f0df03937d5 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 4 Aug 2006 11:51:46 +0000 Subject: [PATCH] * Use old-school pipe opens; the new style is Perl >= 5.8.0. --- scripts/nix-build.in | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/nix-build.in b/scripts/nix-build.in index 1357b7a12..2bea463d3 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 () {chomp; push @drvPaths, $_;} - close DRVPATHS or die; + close DRVPATHS or exit 1; foreach my $drvPath (@drvPaths) { my $target = readlink $drvPath;