summaryrefslogtreecommitdiff
path: root/dgit
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2016-07-16 23:34:32 +0100
committerIan Jackson <ijackson@chiark.greenend.org.uk>2016-07-17 13:46:14 +0100
commit1be66e47fb2675f35f301e5e0f7e9e66e70d2437 (patch)
tree4ac62797f25efc2c824f4b7990935f32d48c8640 /dgit
parent84c2dd303ece2a5b2e8d91b332b1e2125a348d15 (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-xdgit4
1 files changed, 2 insertions, 2 deletions
diff --git a/dgit b/dgit
index ddcde9a..f60180c 100755
--- a/dgit
+++ b/dgit
@@ -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>) {