Skip to content

Commit b1cde06

Browse files
committed
Fix CI
1 parent 0adb602 commit b1cde06

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

.github/scripts/test.sh

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -30,32 +30,32 @@ sha_sum "$(raw_eghcup --offline whereis ghcup)"
3030

3131
### Haskell test suite
3232

33-
./ghcup-test${ext}
34-
./ghcup-test-optparse${ext}
35-
rm ghcup-test${ext} ghcup-test-optparse${ext}
33+
./"ghcup-test${ext}"
34+
./"ghcup-test-optparse${ext}"
35+
rm "ghcup-test${ext}" "ghcup-test-optparse${ext}"
3636

3737
### manual cli based testing
3838

3939
eghcup --numeric-version
4040

41-
eghcup install ghc ${GHC_VER}
42-
eghcup unset ghc ${GHC_VER}
43-
ls -lah "$(eghcup whereis -d ghc ${GHC_VER})"
44-
[ "`$(eghcup whereis ghc ${GHC_VER}) --numeric-version`" = "${GHC_VER}" ]
45-
[ "`eghcup run --ghc ${GHC_VER} -- ghc --numeric-version`" = "${GHC_VER}" ]
46-
[ "`ghcup run --ghc ${GHC_VER} -- ghc -e 'Control.Monad.join (Control.Monad.fmap System.IO.putStr System.Environment.getExecutablePath)'`" = "`$(ghcup whereis ghc ${GHC_VER}) -e 'Control.Monad.join (Control.Monad.fmap System.IO.putStr System.Environment.getExecutablePath)'`" ]
47-
eghcup set ghc ${GHC_VER}
48-
eghcup install cabal ${CABAL_VER}
49-
[ "`$(eghcup whereis cabal ${CABAL_VER}) --numeric-version`" = "${CABAL_VER}" ]
41+
eghcup install ghc "${GHC_VER}"
42+
eghcup unset ghc "${GHC_VER}"
43+
ls -lah "$(eghcup whereis -d ghc "${GHC_VER}")"
44+
[ "$($(eghcup whereis ghc "${GHC_VER}") --numeric-version)" = "${GHC_VER}" ]
45+
[ "$(eghcup run -q --ghc "${GHC_VER}" -- ghc --numeric-version)" = "${GHC_VER}" ]
46+
[ "$(ghcup run -q --ghc "${GHC_VER}" -- ghc -e 'Control.Monad.join (Control.Monad.fmap System.IO.putStr System.Environment.getExecutablePath)')" = "$($(ghcup whereis ghc "${GHC_VER}") -e 'Control.Monad.join (Control.Monad.fmap System.IO.putStr System.Environment.getExecutablePath)')" ]
47+
eghcup set ghc "${GHC_VER}"
48+
eghcup install cabal "${CABAL_VER}"
49+
[ "$($(eghcup whereis cabal "${CABAL_VER}") --numeric-version)" = "${CABAL_VER}" ]
5050
eghcup unset cabal
5151
"$GHCUP_BIN"/cabal --version && exit 1 || echo yes
5252

5353
# make sure no cabal is set when running 'ghcup run' to check that PATH propagages properly
5454
# https://gitlab.haskell.org/haskell/ghcup-hs/-/issues/375
55-
[ "`eghcup run --cabal ${CABAL_VER} -- cabal --numeric-version`" = "${CABAL_VER}" ]
56-
eghcup set cabal ${CABAL_VER}
55+
[ "$(eghcup run -q --cabal "${CABAL_VER}" -- cabal --numeric-version)" = "${CABAL_VER}" ]
56+
eghcup set cabal "${CABAL_VER}"
5757

58-
[ "`$(eghcup whereis cabal ${CABAL_VER}) --numeric-version`" = "${CABAL_VER}" ]
58+
[ "$($(eghcup whereis cabal "${CABAL_VER}") --numeric-version)" = "${CABAL_VER}" ]
5959

6060
if [ "${OS}" != "FreeBSD" ] ; then
6161
if [ "${ARCH}" = "64" ] && [ "${DISTRO}" != "Alpine" ] ; then
@@ -85,10 +85,10 @@ eghcup list -t cabal
8585

8686
ghc_ver=$(ghc --numeric-version)
8787
ghc --version
88-
ghc-${ghc_ver} --version
88+
"ghc-${ghc_ver}" --version
8989
if [ "${OS}" != "Windows" ] ; then
9090
ghci --version
91-
ghci-${ghc_ver} --version
91+
"ghci-${ghc_ver}" --version
9292
fi
9393

9494

@@ -132,11 +132,11 @@ else
132132
eghcup --offline set 8.10.3
133133
eghcup set 8.10.3
134134
[ "$(ghc --numeric-version)" = "8.10.3" ]
135-
eghcup set ${GHC_VER}
135+
eghcup set "${GHC_VER}"
136136
[ "$(ghc --numeric-version)" = "${ghc_ver}" ]
137137
eghcup unset ghc
138138
"$GHCUP_BIN"/ghc --numeric-version && exit 1 || echo yes
139-
eghcup set ${GHC_VER}
139+
eghcup set "${GHC_VER}"
140140
eghcup --offline rm 8.10.3
141141
[ "$(ghc --numeric-version)" = "${ghc_ver}" ]
142142

@@ -169,10 +169,10 @@ fi
169169
# check that lazy loading works for 'whereis'
170170
cp "$CI_PROJECT_DIR/data/metadata/ghcup-${JSON_VERSION}.yaml" "$CI_PROJECT_DIR/data/metadata/ghcup-${JSON_VERSION}.yaml.bak"
171171
echo '**' > "$CI_PROJECT_DIR/data/metadata/ghcup-${JSON_VERSION}.yaml"
172-
eghcup whereis ghc $(ghc --numeric-version)
172+
eghcup whereis ghc "$(ghc --numeric-version)"
173173
mv -f "$CI_PROJECT_DIR/data/metadata/ghcup-${JSON_VERSION}.yaml.bak" "$CI_PROJECT_DIR/data/metadata/ghcup-${JSON_VERSION}.yaml"
174174

175-
eghcup rm $(ghc --numeric-version)
175+
eghcup rm "$(ghc --numeric-version)"
176176

177177
# https://gitlab.haskell.org/haskell/ghcup-hs/-/issues/116
178178
if [ "${OS}" = "Linux" ] ; then
@@ -186,7 +186,7 @@ eghcup gc -c
186186

187187
# test etags
188188
rm -f "${GHCUP_DIR}/cache/ghcup-${JSON_VERSION}.yaml"
189-
raw_eghcup -s https://www.haskell.org/ghcup/data/ghcup-${JSON_VERSION}.yaml list
189+
raw_eghcup -s "https://www.haskell.org/ghcup/data/ghcup-${JSON_VERSION}.yaml" list
190190
# snapshot yaml and etags file
191191
etag=$(cat "${GHCUP_DIR}/cache/ghcup-${JSON_VERSION}.yaml.etags")
192192
sha=$(sha_sum "${GHCUP_DIR}/cache/ghcup-${JSON_VERSION}.yaml")

0 commit comments

Comments
 (0)