Skip to content

Commit

Permalink
Replace "|&" syntax with "2>& |" syntax for compatibility with older …
Browse files Browse the repository at this point in the history
…versions of bash
  • Loading branch information
christopherwharrop-noaa committed Jan 29, 2024
1 parent d6f4ad4 commit 5117700
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5117700

Please sign in to comment.