Set metadata fetching mode to strict in bootstrap script

And improve error messages.
This commit is contained in:
Julian Ospald 2023-02-01 16:44:10 +08:00
parent 3d1b8859cd
commit 69d325bf90
Signed by: hasufell
GPG Key ID: 3786C5262ECB4A3F

View File

@ -120,19 +120,21 @@ edo() {
} }
eghcup() { eghcup() {
edo _eghcup "$@" _eghcup "$@"
} }
_eghcup() { _eghcup() {
if [ -n "${BOOTSTRAP_HASKELL_YAML}" ] ; then if [ -n "${BOOTSTRAP_HASKELL_YAML}" ] ; then
args="-s ${BOOTSTRAP_HASKELL_YAML}" args="-s ${BOOTSTRAP_HASKELL_YAML} --metadata-fetching-mode=Strict"
else
args="--metadata-fetching-mode=Strict"
fi fi
if [ -z "${BOOTSTRAP_HASKELL_VERBOSE}" ] ; then if [ -z "${BOOTSTRAP_HASKELL_VERBOSE}" ] ; then
# shellcheck disable=SC2086 # shellcheck disable=SC2086
"${GHCUP_BIN}/ghcup" ${args} "$@" "${GHCUP_BIN}/ghcup" ${args} "$@" || die "\"ghcup ${args} $*\" failed!"
else else
# shellcheck disable=SC2086 # shellcheck disable=SC2086
"${GHCUP_BIN}/ghcup" ${args} --verbose "$@" "${GHCUP_BIN}/ghcup" ${args} --verbose "$@" || die "\"ghcup ${args} --verbose $*\" failed!"
fi fi
} }
@ -147,7 +149,7 @@ _ecabal() {
} }
ecabal() { ecabal() {
edo _ecabal "$@" _ecabal "$@" || die "\"cabal $*\" failed!"
} }
_done() { _done() {