pass -no-run-if-empty instead

This commit is contained in:
Girish Ramakrishnan
2016-05-23 15:50:36 -07:00
parent f5b777ab33
commit 00726b01e2
2 changed files with 8 additions and 8 deletions
+1 -3
View File
@@ -37,9 +37,7 @@ echo "Upgrading infrastructure from ${infra_version} to ${INFRA_VERSION}"
# TODO: be nice and stop addons cleanly (example, shutdown commands)
existing_containers=$(docker ps -qa)
echo "Remove containers: ${existing_containers}"
if [[ -n "${existing_containers}" ]]; then
echo "${existing_containers}" | xargs docker rm -f
fi
echo "${existing_containers}" | xargs --no-run-if-empty docker rm -f
# a hack to 'refresh' images when testing with hotfix --recreate-infra
if [[ -z "${infra_version}" ]]; then