Skip to content
Snippets Groups Projects
Commit 9b40ea32 authored by Richard Hartmann's avatar Richard Hartmann
Browse files

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`.
parent 056f86ae
No related branches found
No related tags found
No related merge requests found
...@@ -257,6 +257,7 @@ pull() { ...@@ -257,6 +257,7 @@ pull() {
export GIT_DIR="$VCSH_REPO_D/$VCSH_REPO_NAME.git" export GIT_DIR="$VCSH_REPO_D/$VCSH_REPO_NAME.git"
use use
git pull git pull
VCSH_COMMAND_RETURN_CODE=$?
echo echo
done done
hook post-pull hook post-pull
...@@ -295,6 +296,7 @@ run() { ...@@ -295,6 +296,7 @@ run() {
hook pre-run hook pre-run
use use
"$@" "$@"
VCSH_COMMAND_RETURN_CODE=$?
hook post-run hook post-run
} }
...@@ -499,3 +501,4 @@ hook pre-command ...@@ -499,3 +501,4 @@ hook pre-command
$VCSH_COMMAND "$@" $VCSH_COMMAND "$@"
hook post-command hook post-command
verbose "$VCSH_COMMAND end, exiting" verbose "$VCSH_COMMAND end, exiting"
exit $VCSH_COMMAND_RETURN_CODE
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment