Skip to contentSkip to conversation

When exec() fails include the failing command in the error message

PATCH New Ask Bjørn Hansen 1 participant 1 message Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 When exec() fails include the failing command in the error message

git-svn occasionally fails with no details as to what went wrong - this should help debug those situations.

---
 perl/Git.pm |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
perl/Git.pm +1 -1
index 3f4080c..dca92c8 100644
@@ -812,7 +812,7 @@ sub _cmd_exec {
 		$self->wc_subdir() and chdir($self->wc_subdir());
 	}
 	_execv_git_cmd(@args);
-	die "exec failed: $!";
+	die qq[exec "@args" failed: $!];
 }
 
 # Execute the given Git command ($_[0]) with arguments ($_[1..])
Signature · 1 line
1.5.3.5.561.g140d