From 1481e69cee500a98aafca08e676c9e47fb1c9fb7 Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Thu, 30 Oct 2025 09:25:59 +0530 Subject: Allow multilevel extend in config --- lib/Daffm/Configuration.hs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'lib') 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 -- cgit v1.3.1