From 083fe4947fabae02ee0f564e9bca560d46bf8862 Mon Sep 17 00:00:00 2001 From: 89luca89 Date: Wed, 15 Dec 2021 19:21:51 +0100 Subject: [PATCH] create: redirect inspect output, we only need the exit code. --- distrobox-create | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/distrobox-create b/distrobox-create index 820804cbb4..9db0d53738 100755 --- a/distrobox-create +++ b/distrobox-create @@ -215,7 +215,7 @@ fi # Check if the container already exists. # If it does, notify the user and exit. -if "${container_manager}" inspect --type container "${container_name}"; then +if "${container_manager}" inspect --type container "${container_name}" >/dev/null 2>&1; then printf "Distrobox named '%s' already exists.\n" "${container_name}" printf "To enter, run:\n" printf "\tdistrobox-enter --name %s\n" "${container_name}" @@ -224,7 +224,7 @@ fi # First, check if the image exists in the host. # If not prompt to download it. -if ! ${container_manager} inspect --type image "${container_image}"; then +if ! ${container_manager} inspect --type image "${container_image}" >/dev/null 2>&1; then # Prompt to download it. printf >&2 "Image not found.\n" printf >&2 "Do you want to pull the image now?[y/n] "