diff --git a/bin/git-gpush b/bin/git-gpush index 25849ecf1cf69b012d5a006d3d4709b517f4e2fe..1f111fc39eaee41a2e4d24333a9df80cc9cbd2f2 100755 --- a/bin/git-gpush +++ b/bin/git-gpush @@ -288,7 +288,9 @@ sub push_patches() push @gitcmd, $remote, "$ref_from:refs/".($draft > 0 ? 'drafts' : 'for')."/$ref_to"; print '+ '.format_cmd(@gitcmd)."\n" if ($verbose); - exit system(@gitcmd); + my $ex = system(@gitcmd); + die("Failed to run ".format_cmd(@gitcmd).": $!\n") if ($ex < 0); + exit($ex >> 8) if ($ex); } load_aliases();