From 12cd7829828eae193159775916d206a3fce604d7 Mon Sep 17 00:00:00 2001 From: Chad Redman Date: Mon, 24 Jan 2022 18:04:39 -0500 Subject: [PATCH] GRP-3779: gsh script in container with error doesn't exit with non-zero --- container_files/usr-local-bin/gsh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/container_files/usr-local-bin/gsh b/container_files/usr-local-bin/gsh index 8aab4b87..a9826835 100755 --- a/container_files/usr-local-bin/gsh +++ b/container_files/usr-local-bin/gsh @@ -7,6 +7,9 @@ runCommand_unsetAll export GSH_JVMARGS="$GSH_JVMARGS -DENV=$ENV -DUSERTOKEN=$USERTOKEN" +# capture result of gsh, not tee +set -o pipefail + # openshift cannot do whoami if [ "$GROUPER_GSH_CHECK_USER" = "true" ] && [ "$GROUPER_GSH_USER" != "$(whoami)" ] then