Use a more direct way to check for the customized toolbox image

... than grepping the output of something else. One nice side-effect
is that the --verbose output becomes more meaningful.
This commit is contained in:
Debarshi Ray 2018-09-26 17:14:08 +02:00
parent 65ce3f76e8
commit f30dd246dc

View file

@ -31,7 +31,7 @@ create()
(
working_container_name="fedora-toolbox-working-container-$(uuidgen --time)"
if ! $prefix_sudo buildah images --noheading | grep --quiet $toolbox_image; then
if ! $prefix_sudo buildah inspect --type image $toolbox_image >/dev/null 2>&42; then
if ! $prefix_sudo buildah from --name $working_container_name $base_toolbox_image >/dev/null 2>&42; then
echo "$0: failed to create working container"
exit 1