diff --git a/.appveyor.yml b/.appveyor.yml index b97387427..ca3ffc621 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -69,12 +69,12 @@ install: # # install ghc #- stack setup -# use ghc 8.2 to avoid a hledger-web -> network/stack build issue on windows, -# network 2.7.0.1 should work around it when released +# use ghc 8.2 to avoid hledger-web -> network/stack/ghc/windows build issue # https://github.com/haskell/network/issues/313 # https://github.com/commercialhaskell/stack/issues/3944 -#- stack --stack-yaml=stack-ghc8.2.yaml setup -- stack setup +# network 2.7.0.1 is supposed to work around it +- stack setup --stack-yaml=stack-ghc8.2.yaml +#- stack setup #- set PATH=C:\Users\appveyor\AppData\Roaming\local\bin;%PATH% #- stack install shelltestrunner @@ -83,9 +83,11 @@ install: # hledger-ui's vty dep isn't available on windows # hledger-api not tried recently build_script: -#- stack build --test --copy-bins --local-bin-path=. hledger hledger-web # use network 2.7.0.1+ to avoid https://github.com/haskell/network/issues/313 -- stack build --test --copy-bins --local-bin-path=. hledger hledger-web network-2.7.0.2 +#- stack build --test --copy-bins --local-bin-path=. hledger hledger-web network-2.7.0.2 +# use ghc 8.2 to avoid hledger-web -> network/stack/ghc/windows build issue +# don't run test suites to avoid easytest/windows utf8 issue +- stack build --copy-bins --local-bin-path=. hledger hledger-web --stack-yaml=stack-ghc8.2.yaml - 7z a -tzip hledger.zip hledger.exe hledger-web.exe #- hledger-install/hledger-install.sh diff --git a/hledger/Hledger/Cli/Commands.hs b/hledger/Hledger/Cli/Commands.hs index 9e0bb4118..68d10e7d6 100644 --- a/hledger/Hledger/Cli/Commands.hs +++ b/hledger/Hledger/Cli/Commands.hs @@ -244,6 +244,10 @@ FLAGS testcmd :: CliOpts -> Journal -> IO () testcmd opts _undefined = do let args = words' $ query_ $ reportopts_ opts + -- workaround for https://github.com/joelburget/easytest/issues/11 +-- import System.IO (hSetEncoding, stdout, stderr, utf8) +-- hSetEncoding stdout utf8 +-- hSetEncoding stderr utf8 e <- runEasytests args $ EasyTest.tests [tests_Hledger, tests_Commands] if e then exitFailure else exitSuccess