Fix volume/secret deletion logic
- Fix escaping of quotes - Dont delete things unless options are passed
This commit is contained in:
parent
7434b67c34
commit
621c8cd5c4
12
abra
12
abra
@ -1135,16 +1135,20 @@ sub_app_delete (){
|
||||
prompt_confirm
|
||||
fi
|
||||
|
||||
# shellcheck disable=SC2086
|
||||
docker volume rm --force "$(docker volume ls --filter \"name=${STACK_NAME}\" --quiet)"
|
||||
if [ "$abra___volumes" = "true" ]; then
|
||||
# shellcheck disable=SC2086
|
||||
docker volume rm --force "$(docker volume ls --filter "name=${STACK_NAME}" --quiet)"
|
||||
fi
|
||||
|
||||
if [ "$abra___force" != "true" ] && [ "$abra___secrets" = "true" ]; then
|
||||
warning "SCARY: About to remove all secrets associated with ${STACK_NAME}"
|
||||
prompt_confirm
|
||||
fi
|
||||
|
||||
# shellcheck disable=SC2086
|
||||
docker secret rm --force "$(docker secret ls --filter \"name=${STACK_NAME}\" --quiet)"
|
||||
if [ "$abra___secrets" = "true" ]; then
|
||||
# shellcheck disable=SC2086
|
||||
docker secret rm "$(docker secret ls --filter "name=${STACK_NAME}" --quiet)"
|
||||
fi
|
||||
}
|
||||
|
||||
###### .. app secret insert
|
||||
|
Reference in New Issue
Block a user