From 51177007461a8b7bd97b263ae708714a5658b858 Mon Sep 17 00:00:00 2001 From: Christopher Harrop <Christopher.W.Harrop@noaa.gov> Date: Mon, 29 Jan 2024 11:58:39 -0700 Subject: [PATCH] Replace "|&" syntax with "2>& |" syntax for compatibility with older versions of bash --- setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.sh b/setup.sh index ad4f32ca5..2307409f0 100755 --- a/setup.sh +++ b/setup.sh @@ -26,7 +26,7 @@ msg1="Added repo with namespace" msg2="Repository is already registered with Spack" for repo in spack-stack; do repodir=${SPACK_STACK_DIR}/spack-ext/repos/$repo - othererrors=$( ( spack repo add $repodir --scope defaults |& grep -v -e "$msg1" -e "$msg2" ) || true ) + othererrors=$( ( spack repo add $repodir --scope defaults 2>&1 | grep -v -e "$msg1" -e "$msg2" ) || true ) if [ $(echo "$othererrors" | grep -c .) -ne 0 ]; then echo "$othererrors" return 2