summaryrefslogtreecommitdiff
path: root/tcwg-cleanup-stale-containers.sh
diff options
context:
space:
mode:
authorDavid Spickett <david.spickett@linaro.org>2020-04-29 09:22:29 +0100
committerDavid Spickett <david.spickett@linaro.org>2020-04-29 09:23:47 +0100
commitd9dae9777271919239e9c1db91e37d10b81f4d35 (patch)
treece2fc48bc697dc5c5b3e4bb13865af171cca1697 /tcwg-cleanup-stale-containers.sh
parent6273fc478b9c95c4ae8d42c9021f9428b1d43811 (diff)
tcwg-cleanup-stale-containers.sh
Don't add empty container names to the list to remove. This was causing us to run docker commands without container names. Change-Id: Iddf2c7aa268aec4a6254db1bf6e4c66850bb7dfa
Diffstat (limited to 'tcwg-cleanup-stale-containers.sh')
-rwxr-xr-xtcwg-cleanup-stale-containers.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/tcwg-cleanup-stale-containers.sh b/tcwg-cleanup-stale-containers.sh
index 2b1a87c8..854c4233 100755
--- a/tcwg-cleanup-stale-containers.sh
+++ b/tcwg-cleanup-stale-containers.sh
@@ -109,7 +109,9 @@ do_cleanup_containers ()
;;
esac
fi
- rm_containers=("${rm_containers[@]}" "$container")
+ if [ -n "$container" ]; then
+ rm_containers=("${rm_containers[@]}" "$container")
+ fi
fi
done