1 -- 2021-10-07, issue #7705
3 -- Non-existent config file given explicitly (via option or environment variable)
4 -- should not be filled with default content.
5 -- Rather, an error should be raised.
7 -- See also @PackageTests/UserConfig/cabal.test.hs@ for testing of command
10 -- We use the @info@ command as it does not have side-effects.
11 -- Does not really matter which command we use for this test,
12 -- except that it should accept option @--config-file@.
14 -- This is a golden value test that reports the produced error message.
15 -- Needs to be checked manually whether it meets expectations.
17 import Test
.Cabal
.Prelude
21 cabalG
[ "--config-file", "does.not.exist" ] "info" [ "happy" ]
22 fails
$ withEnv
[("CABAL_CONFIG", Just
"absent.file")] $
23 cabal
"info" [ "alex" ]