run_*_progress: fix error message when exec() failed
This commit is contained in:
parent
a3f69f8874
commit
0345d30ae6
1 changed files with 6 additions and 4 deletions
10
mmdebstrap
10
mmdebstrap
|
@ -452,8 +452,9 @@ sub run_dpkg_progress {
|
||||||
my $fd = fileno $wfh;
|
my $fd = fileno $wfh;
|
||||||
# redirect dpkg's stderr to stdout so that we can capture it
|
# redirect dpkg's stderr to stdout so that we can capture it
|
||||||
open(STDERR, '>&', STDOUT);
|
open(STDERR, '>&', STDOUT);
|
||||||
exec { $args[0] } @args, "--status-fd=$fd", @debs;
|
my @execargs = (@args, "--status-fd=$fd", @debs);
|
||||||
die "cannot exec() dpkg";
|
exec { $args[0] } @execargs;
|
||||||
|
die 'cannot exec() ' . (join ' ', @execargs);
|
||||||
}
|
}
|
||||||
close $wfh;
|
close $wfh;
|
||||||
|
|
||||||
|
@ -523,8 +524,9 @@ sub run_apt_progress {
|
||||||
my $fd = fileno $wfh;
|
my $fd = fileno $wfh;
|
||||||
# redirect apt's stderr to stdout so that we can capture it
|
# redirect apt's stderr to stdout so that we can capture it
|
||||||
open(STDERR, '>&', STDOUT);
|
open(STDERR, '>&', STDOUT);
|
||||||
exec { $args[0] } @args, "-oAPT::Status-Fd=$fd", @debs;
|
my @execargs = (@args, "-oAPT::Status-Fd=$fd", @debs);
|
||||||
die "cannot exec apt-get update: $!";
|
exec { $args[0] } @execargs;
|
||||||
|
die 'cannot exec() ' . (join ' ', @execargs);
|
||||||
}
|
}
|
||||||
close $wfh;
|
close $wfh;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue