fix: correct check to see if container exists

This commit is contained in:
Jose Diaz-Gonzalez
2019-03-16 20:40:07 -04:00
parent d9c487bbc7
commit efe30f1a5f

View File

@@ -280,7 +280,7 @@ service_container_rm() {
local ID local ID
service_stop "$SERVICE" service_stop "$SERVICE"
ID=$(docker inspect "$SERVICE_NAME" -f '{{ .ID }}' > /dev/null 2>&1 || true) ID=$(docker ps -a --no-trunc | grep -e "$SERVICE_NAME$" | awk '{print $1}') || true
# this may be 'true' in tests... # this may be 'true' in tests...
if [[ -z "$ID" ]] || [[ "$ID" == "true" ]]; then if [[ -z "$ID" ]] || [[ "$ID" == "true" ]]; then
return 0 return 0