Skip to content
Snippets Groups Projects
Commit 1063f8d4 authored by Felix Fietkau's avatar Felix Fietkau
Browse files

fix ./scripts/env delete

SVN-Revision: 12399
parent 949c1386
No related branches found
No related tags found
No related merge requests found
......@@ -148,10 +148,11 @@ env_clear() {
env_delete() {
local name="${1##*/}"
env_init
[ -z "$name" ] && usage
[ -f "$envdir/.git/refs/heads/$name" ] || error "environment '$name' not found"
[ -f "$ENVDIR/.git/refs/heads/$name" ] || error "environment '$name' not found"
branch="$(git branch | grep '^\* ' | awk '{print $2}')"
[ "$name" = "branch" ] && error "cannot delete the currently selected environment"
[ "$name" = "$branch" ] && error "cannot delete the currently selected environment"
git branch -D "$name"
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment