From ec4bf918fd258ab26a68518dc25409573f2135e1 Mon Sep 17 00:00:00 2001 From: brandon s allbery kf8nh Date: Wed, 3 Jul 2024 21:23:58 -0400 Subject: [PATCH] fix non-POSIX [[ ]] Otherwise CI prints `validate.sh: 332: [[: not found` and the line does nothing (but `validate.sh` continues to run), unless the system shell is `ksh` / `bash` / `zsh`. This may explain https://github.com/haskell/cabal/pull/10114#issuecomment-2178163927. --- validate.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/validate.sh b/validate.sh index 40ad0576b5f..edb1db83277 100755 --- a/validate.sh +++ b/validate.sh @@ -329,7 +329,7 @@ CABALLISTBIN="${CABAL} list-bin --builddir=$BUILDDIR --project-file=$PROJECTFILE # of validate.sh # https://github.com/haskell/cabal/issues/9571 # https://github.com/haskell/cabal/pull/10114 -RTSOPTS="$([[ $ARCH = "x86_64-windows" && -z "$CI" ]] && echo "+RTS --io-manager=native" || echo "")" +RTSOPTS="$([ $ARCH = "x86_64-windows" ] && [ -z "$CI" ] && echo "+RTS --io-manager=native" || echo "")" # header #######################################################################