From 2a1dbbdb89ced47f8be97037b4a306f32c225a1d Mon Sep 17 00:00:00 2001 From: lroche <1540492+lroche@users.noreply.github.com> Date: Fri, 16 Mar 2018 18:43:30 +0100 Subject: [PATCH] Added exit code if fast-export failed. --- hg2git.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/hg2git.sh b/hg2git.sh index 7f0df86..bb05ea0 100644 --- a/hg2git.sh +++ b/hg2git.sh @@ -15,6 +15,9 @@ git config core.ignoreCase false /usr/local/src/fast-export/hg-fast-export.sh -r /work/$PROJECT_NAME -git checkout HEAD - -bash +if [ "$?" -ne "0" ]; then + exit 1 +else + git checkout HEAD + bash +fi \ No newline at end of file