From b935c755c9befcfa81c2f28380dd8f9fb59b9a50 Mon Sep 17 00:00:00 2001 From: Heavybullets8 Date: Tue, 9 Aug 2022 22:15:21 -0600 Subject: [PATCH] hide both error and info --- functions/cmd_to_container.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/functions/cmd_to_container.sh b/functions/cmd_to_container.sh index d86e82b4..3c50d5bf 100644 --- a/functions/cmd_to_container.sh +++ b/functions/cmd_to_container.sh @@ -82,8 +82,8 @@ do clear -x title - if ! k3s crictl exec -it "$container_id" /bin/bash 2>/dev/null; then - k3s crictl exec -it "$container_id" /bin/sh 2>/dev/null || echo "This container does not accept shell access, try a different one." + if ! k3s crictl exec -it "$container_id" /bin/bash &>/dev/null; then + k3s crictl exec -it "$container_id" /bin/sh &>/dev/null || echo "This container does not accept shell access, try a different one." fi break ;;