From 9b40ea328d5dab1dd5a0d5ed653bacb577a24aed Mon Sep 17 00:00:00 2001
From: Richard Hartmann <richih@debian.org>
Date: Thu, 13 Feb 2014 00:39:21 +0100
Subject: [PATCH] vcsh: Pass along exit code
If `git foo` exits 13, it would be prudent for vcsh to exit 13, as well.
Start with support for `vcsh pull`.
---
vcsh | 3 +++
1 file changed, 3 insertions(+)
diff --git a/vcsh b/vcsh
index a6d8213..b78235b 100755
--- a/vcsh
+++ b/vcsh
@@ -257,6 +257,7 @@ pull() {
export GIT_DIR="$VCSH_REPO_D/$VCSH_REPO_NAME.git"
use
git pull
+ VCSH_COMMAND_RETURN_CODE=$?
echo
done
hook post-pull
@@ -295,6 +296,7 @@ run() {
hook pre-run
use
"$@"
+ VCSH_COMMAND_RETURN_CODE=$?
hook post-run
}
@@ -499,3 +501,4 @@ hook pre-command
$VCSH_COMMAND "$@"
hook post-command
verbose "$VCSH_COMMAND end, exiting"
+exit $VCSH_COMMAND_RETURN_CODE
--
GitLab