Fix postgrest-coverage throwing error when installed with nix-env

This commit is contained in:
Wolfgang Walther
2020-12-30 16:38:13 +01:00
committed by Remo Rechkemmer
parent 568477b6af
commit 93541035f6
+3 -3
View File
@@ -6,6 +6,7 @@
, curl , curl
, devCabalOptions , devCabalOptions
, ghc , ghc
, glibcLocales
, gnugrep , gnugrep
, haskell , haskell
, hpc-codecov , hpc-codecov
@@ -176,6 +177,7 @@ let
'' ''
env="$(cat ${postgrest.env})" env="$(cat ${postgrest.env})"
export PATH="$env/bin:$PATH" export PATH="$env/bin:$PATH"
export LOCALE_ARCHIVE="${glibcLocales}/lib/locale/locale-archive"
# clean up previous coverage reports # clean up previous coverage reports
mkdir -p coverage mkdir -p coverage
@@ -227,9 +229,7 @@ let
${hpc-codecov}/bin/hpc-codecov --mix=.hpc --out=coverage/codecov.json coverage/postgrest.tix ${hpc-codecov}/bin/hpc-codecov --mix=.hpc --out=coverage/codecov.json coverage/postgrest.tix
# create html and stdout reports # create html and stdout reports
# TODO: The markup command fails when run outside nix-shell (i.e. in CI!) ${ghc}/bin/hpc markup --destdir=coverage coverage/postgrest.tix
# Need to fix it properly in the future instead of adding the || true
${ghc}/bin/hpc markup --destdir=coverage coverage/postgrest.tix || true
echo "file://$(pwd)/coverage/hpc_index.html" echo "file://$(pwd)/coverage/hpc_index.html"
${ghc}/bin/hpc report coverage/postgrest.tix "$@" ${ghc}/bin/hpc report coverage/postgrest.tix "$@"
fi fi