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
8
abra
8
abra
@ -1135,16 +1135,20 @@ sub_app_delete (){
|
|||||||
prompt_confirm
|
prompt_confirm
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "$abra___volumes" = "true" ]; then
|
||||||
# shellcheck disable=SC2086
|
# shellcheck disable=SC2086
|
||||||
docker volume rm --force "$(docker volume ls --filter \"name=${STACK_NAME}\" --quiet)"
|
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
|
||||||
|
|
||||||
|
if [ "$abra___secrets" = "true" ]; then
|
||||||
# shellcheck disable=SC2086
|
# shellcheck disable=SC2086
|
||||||
docker secret rm --force "$(docker secret ls --filter \"name=${STACK_NAME}\" --quiet)"
|
docker secret rm "$(docker secret ls --filter "name=${STACK_NAME}" --quiet)"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
###### .. app secret insert
|
###### .. app secret insert
|
||||||
|
Loading…
Reference in New Issue
Block a user