add return before exit

exit in sourced script cause termination of whole shell/terminal
This commit is contained in:
Jakobus Schürz 2020-01-14 11:59:17 +01:00
parent 035496f7ec
commit 2f38d0d194

View file

@ -180,7 +180,7 @@ if [ -n "$PS1" ] ;then
else
MYSHELLCONFIG_GIT_REMOTE="${MYSHELLCONFIG_GIT_REMOTE_PUBLIC_HTTP}${MYSHELLCONFIG_GIT_REPO_NAME}"
echo "Clone ${MYSHELLCONFIG_GIT_REMOTE} and configure git" >&2
timeout --foreground "${MYSHELLCONFIG_GIT_CHECKOUT_TIMEOUT}" git -C ${HOME} clone "${MYSHELLCONFIG_GIT_REMOTE}" "${MYSHELLCONFIG_BASE}" || exit 1
timeout --foreground "${MYSHELLCONFIG_GIT_CHECKOUT_TIMEOUT}" git -C ${HOME} clone "${MYSHELLCONFIG_GIT_REMOTE}" "${MYSHELLCONFIG_BASE}" || return 1 2>/dev/null || exit 1
fi