Make cabal-cache non-fatal

This commit is contained in:
2023-07-07 22:36:09 +08:00
parent 055df584a4
commit 422b99a222
3 changed files with 30 additions and 2 deletions

20
.github/scripts/cabal-cache.sh vendored Normal file
View File

@@ -0,0 +1,20 @@
#!/usr/bin/env bash
case "$(uname -s)" in
MSYS_*|MINGW*)
ext=".exe"
;;
*)
ext=""
;;
esac
if [ "${CABAL_CACHE_DISABLE}" = "yes" ] ; then
echo "cabal-cache disabled (CABAL_CACHE_DISABLE set)"
elif [ "${CABAL_CACHE_NONFATAL}" = "yes" ] ; then
time "cabal-cache${ext}" "$@" || echo "cabal-cache failed (CABAL_CACHE_NONFATAL set)"
else
time "cabal-cache${ext}" "$@"
exit $?
fi