Skip to content

Commit

Permalink
create: redirect inspect output, we only need the exit code.
Browse files Browse the repository at this point in the history
  • Loading branch information
89luca89 committed Dec 15, 2021
1 parent c2965ac commit 083fe49
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions distrobox-create
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand All @@ -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] "
Expand Down

0 comments on commit 083fe49

Please sign in to comment.