diff options
| author | Akshay Nair <phenax5@gmail.com> | 2025-10-30 09:25:59 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2025-10-30 09:25:59 +0530 |
| commit | 1481e69cee500a98aafca08e676c9e47fb1c9fb7 (patch) | |
| tree | a44e29ab301bb897ec14c9e93e42dc2f9ec6b35e /lib/Daffm/Configuration.hs | |
| parent | ca6a853f3ab4994db3d45ba0677bdae1a1769ff6 (diff) | |
| download | daffm-1481e69cee500a98aafca08e676c9e47fb1c9fb7.tar.gz daffm-1481e69cee500a98aafca08e676c9e47fb1c9fb7.zip | |
Allow multilevel extend in config
Diffstat (limited to '')
| -rw-r--r-- | lib/Daffm/Configuration.hs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/Daffm/Configuration.hs b/lib/Daffm/Configuration.hs index 884db36..3b61d6e 100644 --- a/lib/Daffm/Configuration.hs +++ b/lib/Daffm/Configuration.hs @@ -80,10 +80,8 @@ loadConfigFile pathM = do config <- load cfgPath case configExtend config of Just path -> do - baseCfgPath <- resolveConfigPath $ Just $ Text.unpack path - if baseCfgPath == cfgPath - then pure config - else (config <>) <$> load baseCfgPath + baseCfg <- loadConfigFile $ Just (Text.unpack path) + pure $ config <> baseCfg _ -> pure config where load = (>>= parseWithDefault) . IO.try . Text.readFile |
