Skip to content

Commit 086bfa5

Browse files
authored
Fix [: -v: unary operator expected (#158)
* Fix `[: -v: unary operator expected` ``` /nix/store/1zcy75q3dr61bka5h4r8rf3kv8k18kw3-ghc96-iog-env.sh: line 1944: [: -v: unary operator expected ``` e.g. seen on https://github.com/IntersectMBO/cardano-node/actions/runs/8977554294/job/24656515205?pr=5817, in the Build all step. * Update quirks.nix
1 parent 559157f commit 086bfa5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

quirks.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@
2626
else
2727
PREFIX="Hint:"
2828
fi
29-
if [ "$GITHUB_ACTIONS" = "true" ] || [ -v CODESPACE_TOKEN ]; then
29+
if [ "$GITHUB_ACTIONS" = "true" ] || [ "$'' + ''{CODESPACE_TOKEN+x}" = "x" ]; then
3030
echo "$PREFIX to reproduce this environment locally, use either:" \
3131
"\`nix develop github:input-output-hk/devx#${flavor}\`, or" \
3232
"\`docker run -it -v \$(pwd):/workspaces ghcr.io/input-output-hk/devx-devcontainer:x86_64-linux.${flavor}\`"
3333
fi
34-
if [ -v CODESPACE_TOKEN ]; then
34+
if [ "$'' + ''{CODESPACE_TOKEN+x}" = "x" ]; then
3535
echo "Quirks:"
3636
echo -e "\tThe Haskell VSCode extension might ask you \"How do you want the extension to manage/discover HLS and the relevant toolchain?\""
3737
echo -e "\tChoose \"Manually via PATH\", not \"Automatically via GHCup\""

0 commit comments

Comments
 (0)