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
|
prompt_confirm
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# shellcheck disable=SC2086
|
if [ "$abra___volumes" = "true" ]; then
|
||||||
docker volume rm --force "$(docker volume ls --filter \"name=${STACK_NAME}\" --quiet)"
|
# shellcheck disable=SC2086
|
||||||
|
docker volume rm --force "$(docker volume ls --filter "name=${STACK_NAME}" --quiet)"
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$abra___force" != "true" ] && [ "$abra___secrets" = "true" ]; then
|
if [ "$abra___force" != "true" ] && [ "$abra___secrets" = "true" ]; then
|
||||||
warning "SCARY: About to remove all secrets associated with ${STACK_NAME}"
|
warning "SCARY: About to remove all secrets associated with ${STACK_NAME}"
|
||||||
prompt_confirm
|
prompt_confirm
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# shellcheck disable=SC2086
|
if [ "$abra___secrets" = "true" ]; then
|
||||||
docker secret rm --force "$(docker secret ls --filter \"name=${STACK_NAME}\" --quiet)"
|
# shellcheck disable=SC2086
|
||||||
|
docker secret rm "$(docker secret ls --filter "name=${STACK_NAME}" --quiet)"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
###### .. app secret insert
|
###### .. app secret insert
|
||||||
|
Reference in New Issue
Block a user