install: be sure to run cabal update if using cabal

[ci skip]
This commit is contained in:
Simon Michael 2018-02-18 14:56:32 -08:00
parent e9fae63e7d
commit a8009f1953

View File

@ -48,7 +48,7 @@ HERE
HLEDGER_INSTALL_TOOL=hledger-install.sh
# ^ this script's name (can't use $0 when it's piped into bash)
HLEDGER_INSTALL_VERSION=20180217
HLEDGER_INSTALL_VERSION=20180218
RESOLVER= #"--resolver=nightly"
# ^ You can specify a different stackage snapshot here,
@ -900,6 +900,9 @@ if [[ $STATUSFLAG ]] ; then
exit 0
fi
# if we'll be using cabal, run cabal update once at the start
(! has_cmd stack && has_cmd cabal && try_info cabal update )
# try installing each package that needs installing, in turn
echo ----------
if [[ $(cmd_version hledger) < $HLEDGER_VERSION ]]; then