imp: setup: setup ignores the config file itself, for robustness

This commit is contained in:
Simon Michael 2025-04-17 17:19:28 -10:00
parent daf550bbb0
commit bb7510194e
2 changed files with 5 additions and 1 deletions

View File

@ -271,7 +271,9 @@ main = exitOnExceptions $ withGhcDebug' $ do
-- Read extra general and command-specific args/opts from the config file, if any.
(conf, mconffile) <-
seq cliconfrawopts $ -- order debug output
getConf cliconfrawopts
if clicmdarg=="setup" -- the setup command checks config files, but never uses one itself
then return (nullconf,Nothing)
else getConf cliconfrawopts
---------------------------------------------------------------
dbgIO "\n3. Identify a command name from config file or command line" ()

View File

@ -615,6 +615,8 @@ This is useful when using hledger in scripts, or when troubleshooting.
When both `--conf` and `--no-conf` options are used, the right-most wins.
To inspect the processing of config files, use `--debug` or `--debug=8`.
Or, run the `setup` command, which will display any active config files.
(Apart from this, `setup` is not affected by config files, unlike other commands.)
**Warning!**