allow tilde in LEDGER env var
This commit is contained in:
parent
7d2a868640
commit
ee8ac17909
@ -36,6 +36,7 @@ getLedgerFilePath :: [Flag] -> IO String
|
|||||||
getLedgerFilePath opts = do
|
getLedgerFilePath opts = do
|
||||||
defaultpath <- tildeExpand "~/ledger.dat"
|
defaultpath <- tildeExpand "~/ledger.dat"
|
||||||
envordefault <- getEnv "LEDGER" `catch` \_ -> return defaultpath
|
envordefault <- getEnv "LEDGER" `catch` \_ -> return defaultpath
|
||||||
|
path <- tildeExpand envordefault
|
||||||
return $ last $ [envordefault] ++ (filter (/= "") (map getFile opts))
|
return $ last $ [envordefault] ++ (filter (/= "") (map getFile opts))
|
||||||
|
|
||||||
-- ledger pattern args are a list of account patterns optionally followed
|
-- ledger pattern args are a list of account patterns optionally followed
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user