diff --git a/lib/ulib/runsmod b/lib/ulib/runsmod index b2674e9..7f606a9 100644 --- a/lib/ulib/runsmod +++ b/lib/ulib/runsmod @@ -375,10 +375,15 @@ function __runsmod_clone_or_pull() { mkdirof "$repodir" git clone ${RUNSMOD_SHALLOW:+--depth 1} "$repourl" "$repodir" || return $? if [ "$RUNSMOD_MODE" == devel ]; then - ( cd "$repodir"; git_have_rbranch develop && git checkout develop ) || return $? + ( + cd "$repodir" + if git_have_rbranch develop; then + git checkout develop || exit 1 + fi + ) || return $? fi git_annex_initial "$repodir" || return $? - return $? + return 0 else estepe "noclone $(ppath "$repodir")" return 1 diff --git a/uproject b/uproject index 9e48dbc..9d0e14d 100755 --- a/uproject +++ b/uproject @@ -274,7 +274,12 @@ elif [ "$CMD" == clone ]; then git_annex_use_ssh_wrapper git clone "$repourl" "$destdir" || die - ( cd "$destdir"; git_have_rbranch develop && git checkout develop ) || die + ( + cd "$destdir" + if git_have_rbranch develop; then + git checkout develop || exit 1 + fi + ) || die git_annex_initial "$destdir" || die elif [ "$CMD" == crone ]; then