mirror of
https://github.com/simonmichael/hledger.git
synced 2024-10-06 10:57:30 +03:00
imp: conf: --debug 1: show all conf files found
This commit is contained in:
parent
1996630b09
commit
b54a31d585
@ -13,7 +13,7 @@ module Hledger.Cli.Conf (
|
||||
)
|
||||
where
|
||||
|
||||
import Control.Monad (void)
|
||||
import Control.Monad (void, forM)
|
||||
import Control.Monad.Identity (Identity)
|
||||
import Data.Functor ((<&>))
|
||||
import qualified Data.Map as M
|
||||
@ -79,6 +79,10 @@ confLookup cmd Conf{confSections} =
|
||||
getConf :: RawOpts -> IO (Conf, Maybe FilePath)
|
||||
getConf rawopts = do
|
||||
defconfpaths <- confFilePaths
|
||||
existingconfpaths <- fmap catMaybes $ forM defconfpaths $ \f -> do
|
||||
x <- doesFileExist f
|
||||
return $ if x then Just f else Nothing
|
||||
dbg1IO "found config files" existingconfpaths
|
||||
let noconf = boolopt "no-conf" rawopts
|
||||
let mconffile0 = maybestringopt "conf" rawopts
|
||||
mconffile <- case mconffile0 of
|
||||
|
Loading…
Reference in New Issue
Block a user