@@ -30,32 +30,32 @@ sha_sum "$(raw_eghcup --offline whereis ghcup)"
30
30
31
31
# ## Haskell test suite
32
32
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} "
36
36
37
37
# ## manual cli based testing
38
38
39
39
eghcup --numeric-version
40
40
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} " ]
50
50
eghcup unset cabal
51
51
" $GHCUP_BIN " /cabal --version && exit 1 || echo yes
52
52
53
53
# make sure no cabal is set when running 'ghcup run' to check that PATH propagages properly
54
54
# 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} "
57
57
58
- [ " ` $( eghcup whereis cabal ${CABAL_VER} ) --numeric-version` " = " ${CABAL_VER} " ]
58
+ [ " $( $( eghcup whereis cabal " ${CABAL_VER} " ) --numeric-version) " = " ${CABAL_VER} " ]
59
59
60
60
if [ " ${OS} " != " FreeBSD" ] ; then
61
61
if [ " ${ARCH} " = " 64" ] && [ " ${DISTRO} " != " Alpine" ] ; then
@@ -85,10 +85,10 @@ eghcup list -t cabal
85
85
86
86
ghc_ver=$( ghc --numeric-version)
87
87
ghc --version
88
- ghc-${ghc_ver} --version
88
+ " ghc-${ghc_ver} " --version
89
89
if [ " ${OS} " != " Windows" ] ; then
90
90
ghci --version
91
- ghci-${ghc_ver} --version
91
+ " ghci-${ghc_ver} " --version
92
92
fi
93
93
94
94
@@ -132,11 +132,11 @@ else
132
132
eghcup --offline set 8.10.3
133
133
eghcup set 8.10.3
134
134
[ " $( ghc --numeric-version) " = " 8.10.3" ]
135
- eghcup set ${GHC_VER}
135
+ eghcup set " ${GHC_VER} "
136
136
[ " $( ghc --numeric-version) " = " ${ghc_ver} " ]
137
137
eghcup unset ghc
138
138
" $GHCUP_BIN " /ghc --numeric-version && exit 1 || echo yes
139
- eghcup set ${GHC_VER}
139
+ eghcup set " ${GHC_VER} "
140
140
eghcup --offline rm 8.10.3
141
141
[ " $( ghc --numeric-version) " = " ${ghc_ver} " ]
142
142
169
169
# check that lazy loading works for 'whereis'
170
170
cp " $CI_PROJECT_DIR /data/metadata/ghcup-${JSON_VERSION} .yaml" " $CI_PROJECT_DIR /data/metadata/ghcup-${JSON_VERSION} .yaml.bak"
171
171
echo ' **' > " $CI_PROJECT_DIR /data/metadata/ghcup-${JSON_VERSION} .yaml"
172
- eghcup whereis ghc $( ghc --numeric-version)
172
+ eghcup whereis ghc " $( ghc --numeric-version) "
173
173
mv -f " $CI_PROJECT_DIR /data/metadata/ghcup-${JSON_VERSION} .yaml.bak" " $CI_PROJECT_DIR /data/metadata/ghcup-${JSON_VERSION} .yaml"
174
174
175
- eghcup rm $( ghc --numeric-version)
175
+ eghcup rm " $( ghc --numeric-version) "
176
176
177
177
# https://gitlab.haskell.org/haskell/ghcup-hs/-/issues/116
178
178
if [ " ${OS} " = " Linux" ] ; then
@@ -186,7 +186,7 @@ eghcup gc -c
186
186
187
187
# test etags
188
188
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
190
190
# snapshot yaml and etags file
191
191
etag=$( cat " ${GHCUP_DIR} /cache/ghcup-${JSON_VERSION} .yaml.etags" )
192
192
sha=$( sha_sum " ${GHCUP_DIR} /cache/ghcup-${JSON_VERSION} .yaml" )
0 commit comments