Fix bug caught by shellcheck
This commit is contained in:
parent
5b363c9eac
commit
c1a76f5f88
2 changed files with 4 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue