From a8009f19537a3aad6b28ee226fba23aa954d57d4 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Sun, 18 Feb 2018 14:56:32 -0800 Subject: [PATCH] install: be sure to run cabal update if using cabal [ci skip] --- hledger-install/hledger-install.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hledger-install/hledger-install.sh b/hledger-install/hledger-install.sh index 2b494440b..e501168d8 100755 --- a/hledger-install/hledger-install.sh +++ b/hledger-install/hledger-install.sh @@ -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