mirror of
https://github.com/clearlinux/official-images.git
synced 2026-08-25 06:55:48 +00:00
5af2e70bc2
Haskell stack can be slow to add new Haskell compiler versions. The stack container test will fail until this is done, which blocks docker Haskell updating as well. Rather, lets ignore that particular failure, but still verify with stack if the compiler version is supported.
21 lines
442 B
Bash
Executable File
21 lines
442 B
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
|
|
# stack mostly sends to stderr
|
|
if ! stackResult="$(stack --resolver ghc-$(ghc --print-project-version) new myproject 2>&1 > /dev/null)"; then
|
|
case "$stackResult" in
|
|
*"Unable to load global hints for"*)
|
|
echo >&2 'skipping; stack does not yet support this Haskell version'
|
|
exit 0
|
|
;;
|
|
*)
|
|
echo >&2 'error: stack failed:'
|
|
echo >&2 "$stackResult"
|
|
exit 1
|
|
;;
|
|
esac
|
|
fi
|
|
|
|
cd myproject
|
|
stack run 2> /dev/null
|