Do not error out if failing to delete images. (#73)
diff --git a/test/configs/autoconfig_test.sh b/test/configs/autoconfig_test.sh
index 1a2f8f3..d0412eb 100755
--- a/test/configs/autoconfig_test.sh
+++ b/test/configs/autoconfig_test.sh
@@ -42,14 +42,14 @@
echo "Attempting to delete ${image}..."
# Only delete the image if it is not used by any running container.
if [[ -z $(docker ps -q -f ancestor=${image}) ]]; then
- docker rmi -f ${image}
+ docker rmi -f ${image} 2>/dev/null
echo "${image} deleted..."
else
echo "${image} is used by another container, not deleted..."
fi
done
echo "Deleting all dangling images..."
- docker images -f "dangling=true" -q | xargs -r docker rmi -f
+ docker images -f "dangling=true" -q | xargs -r docker rmi -f 2>/dev/null
}
trap cleanup_on_finish EXIT # always delete the containers
diff --git a/test/configs/debian8_clang_autoconfig_test.sh b/test/configs/debian8_clang_autoconfig_test.sh
index 0b6eabf..b3241f3 100755
--- a/test/configs/debian8_clang_autoconfig_test.sh
+++ b/test/configs/debian8_clang_autoconfig_test.sh
@@ -39,14 +39,14 @@
echo "Attempting to delete ${image}..."
# Only delete the image if it is not used by any running container.
if [[ -z $(docker ps -q -f ancestor=${image}) ]]; then
- docker rmi -f ${image}
+ docker rmi -f ${image} 2>/dev/null
echo "${image} deleted..."
else
echo "${image} is used by another container, not deleted..."
fi
done
echo "Deleting all dangling images..."
- docker images -f "dangling=true" -q | xargs -r docker rmi -f
+ docker images -f "dangling=true" -q | xargs -r docker rmi -f 2>/dev/null
}
trap cleanup_on_finish EXIT # always delete the containers