From 2e032a5210d5166a42797ee8f296ec4228d6d838 Mon Sep 17 00:00:00 2001 From: Alexander Foremny Date: Mon, 23 Oct 2023 10:08:49 +0200 Subject: add `Git.getRootDir` --- app/Settings.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'app/Settings.hs') 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 ] -- cgit v1.2.3