Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow apps:destroy when not in a project #2270

Merged
merged 3 commits into from
Jun 26, 2016
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion contrib/dokku_client.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@ client_help_msg() {
exit 20 # exit with specific status. only used in units tests for now
}

is_git_repo() {
git rev-parse &>/dev/null
}

has_dokku_remote() {
git remote show dokku &>/dev/null
}

if [[ -z $DOKKU_HOST ]]; then
if [[ -d .git ]] || git rev-parse --git-dir > /dev/null 2>&1; then
DOKKU_HOST=$(git remote -v 2>/dev/null | grep -Ei "^dokku" | head -n 1 | cut -f1 -d' ' | cut -f2 -d '@' | cut -f1 -d':' 2>/dev/null || true)
Expand Down Expand Up @@ -81,7 +89,7 @@ if [[ ! -z $DOKKU_HOST ]]; then
fi
;;
apps:destroy)
git remote remove dokku
is_git_repo && has_dokku_remote && remote remove dokku
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is missing the git part of the remote remove dokku call.

;;
esac

Expand Down