diff options
author | Alexander Foremny <aforemny@posteo.de> | 2023-10-23 10:08:49 +0200 |
---|---|---|
committer | Alexander Foremny <aforemny@posteo.de> | 2023-11-07 09:50:52 +0100 |
commit | 2e032a5210d5166a42797ee8f296ec4228d6d838 (patch) | |
tree | bb71d1b466581114ffd7613d950533ffc1298834 /app/Settings.hs | |
parent | 1127c71fa5f5c5a3d6bfde818cb00eb26e9d4cb3 (diff) |
add `Git.getRootDir`
Diffstat (limited to 'app/Settings.hs')
-rw-r--r-- | app/Settings.hs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/app/Settings.hs b/app/Settings.hs index 116a3d2..c439b65 100644 --- a/app/Settings.hs +++ b/app/Settings.hs @@ -7,8 +7,10 @@ where import Data.Aeson qualified as A import Data.Yaml (decodeFileThrow) import GHC.Generics (Generic) +import Git qualified import System.Directory (doesFileExist) import System.Environment.XDG.BaseDir (getSystemConfigFiles, getUserConfigFile) +import System.FilePath ((</>)) data Settings = Settings { @@ -38,6 +40,5 @@ readSettings = <$> sequence [ getSystemConfigFiles "anissue" "settings.yaml", ((: []) <$> getUserConfigFile "anissue" "settings.yaml"), - -- TODO Read settings from Git base dir - pure ["./anissue.yaml"] + ((: []) . (</> "anissue.yaml")) <$> Git.getRootDir ] |