diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2016-07-16 23:34:32 +0100 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2016-07-17 13:46:14 +0100 |
commit | 1be66e47fb2675f35f301e5e0f7e9e66e70d2437 (patch) | |
tree | 4ac62797f25efc2c824f4b7990935f32d48c8640 /dgit | |
parent | 84c2dd303ece2a5b2e8d91b332b1e2125a348d15 (diff) |
Subprocess error handling: Do not call faildcmd when open fails
failecmd wants to look at $? too and anyway the full command is not of
much interest in these cases.
Diffstat (limited to 'dgit')
-rwxr-xr-x | dgit | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -533,7 +533,7 @@ sub git_slurp_config () { my @cmd = (@git, qw(config -z --get-regexp .*)); debugcmd "|",@cmd; - open GITS, "-|", @cmd or failedcmd @cmd; + open GITS, "-|", @cmd or die $!; while (<GITS>) { chomp or die; printdebug "=> ", (messagequote $_), "\n"; @@ -1243,7 +1243,7 @@ sub git_write_tree () { sub remove_stray_gits () { my @gitscmd = qw(find -name .git -prune -print0); debugcmd "|",@gitscmd; - open GITS, "-|", @gitscmd or failedcmd @gitscmd; + open GITS, "-|", @gitscmd or die $!; { local $/="\0"; while (<GITS>) { |