mirror of
https://github.com/simonmichael/hledger.git
synced 2024-12-27 12:24:43 +03:00
don't break if HOME is undefined
This commit is contained in:
parent
26848584ee
commit
7b1458c9a5
@ -37,7 +37,7 @@ myLedgerPath :: IO String
|
|||||||
myLedgerPath =
|
myLedgerPath =
|
||||||
getEnv ledgerenvvar `catch`
|
getEnv ledgerenvvar `catch`
|
||||||
(\_ -> do
|
(\_ -> do
|
||||||
home <- getHomeDirectory
|
home <- getHomeDirectory `catch` (\_ -> return "")
|
||||||
return $ home </> ledgerdefaultfilename)
|
return $ home </> ledgerdefaultfilename)
|
||||||
|
|
||||||
-- | Get the user's default timelog file path.
|
-- | Get the user's default timelog file path.
|
||||||
|
Loading…
Reference in New Issue
Block a user