diff --git a/libexec/portzap/portzap-clone b/libexec/portzap/portzap-clone index 6d1dc24..ffe982b 100755 --- a/libexec/portzap/portzap-clone +++ b/libexec/portzap/portzap-clone @@ -33,8 +33,9 @@ if ! doas -u _portzap "${git}" \ checkout -t \ origin/"${branch}" \ > /dev/null 2>&1; then + r="${?}" echo "[-] 'git checkout' exited with an error" - exit "${?}" + exit "${r}" else echo "[-] Done" fi diff --git a/libexec/portzap/portzap-pull b/libexec/portzap/portzap-pull index 6438c94..1d35ce0 100755 --- a/libexec/portzap/portzap-pull +++ b/libexec/portzap/portzap-pull @@ -21,8 +21,9 @@ change_branch() doas -u _portzap "${git}" fetch "${remote}" > /dev/null 2>&1 if ! doas -u _portzap "${git}" checkout "${branch}" > /dev/null 2>&1 || doas -u _portzap "${git}" checkout -t "${remote}"/"${branch}" > /dev/null 2>&1; then + r="${?}" echo "[-] 'git checkout' exited with an error" - exit "${?}" + exit "${r}" else echo "[-] Done" fi