fix: correct tests and handle a few edge cases in remote command usage

This commit is contained in:
Jose Diaz-Gonzalez committed 2023-01-14 19:49:14 -05:00
1 parent 9d380e5654
commit a4136f4719
2 files changed
+16 -5

No files matched your search

+10 -3
View File
@@ -168,11 +168,18 @@ main() {
remote:remove)
shift 1
git remote remove "$@"
exit "$?"
local exit_code="$?"
if [[ "$(git config dokku.remote)" == "$1" ]]; then
git config --unset dokku.remote
fi
exit "$exit_code"
;;
remote:unset)
git config --unset dokku.remote
exit "$?"
if [[ -n "$(git config dokku.remote)" ]]; then
git config --unset dokku.remote
exit "$?"
fi
exit 0
;;
esac