From 8c3ba3c99a18c44508ab9c18602c3a06afc726d3 Mon Sep 17 00:00:00 2001 From: Christoph Haas Date: Sun, 20 Sep 2020 00:07:44 +0200 Subject: [PATCH] Fix exit status if no old images have been removed --- build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sh b/build.sh index 3e1469d..7d33c31 100755 --- a/build.sh +++ b/build.sh @@ -25,4 +25,4 @@ docker tag bitbetter/identity bitbetter/identity:$BW_VERSION # Remove old instances of the image after a successful build. ids=$( docker images bitbetter/* | grep -E -v -- "CREATED|latest|${BW_VERSION}" | awk '{ print $3 }' ) -[ -n "$ids" ] && docker rmi $ids +[ -n "$ids" ] && docker rmi $ids || true