@@ -127,7 +127,7 @@ parseConfig = do
127127 -- Here we try to migrate any config that is not in the latest format
128128 withConfigAST $ pure . addSourcePaths
129129
130- path <- askEnv envConfigPath
130+ path <- view configPathL
131131 expr <- liftIO $ Dhall. inputExpr $ " ./" <> path
132132 case expr of
133133 Dhall. RecordLit ks -> do
@@ -156,7 +156,7 @@ parseConfig = do
156156-- | Checks that the Spago config is there and readable
157157ensureConfig :: Spago (Either Utf8Builder Config )
158158ensureConfig = do
159- path <- askEnv envConfigPath
159+ path <- view configPathL
160160 exists <- testfile path
161161 if not exists
162162 then pure $ Left $ display Messages. cannotFindConfig
@@ -179,7 +179,7 @@ ensureConfigUnsafe = ensureConfig >>= \case
179179-- Eventually ports an existing `psc-package.json` to the new config.
180180makeConfig :: Bool -> Dhall. TemplateComments -> Spago ()
181181makeConfig force comments = do
182- path <- askEnv envConfigPath
182+ path <- view configPathL
183183 unless force $ do
184184 hasSpagoDhall <- testfile path
185185 when hasSpagoDhall $ die [ display $ Messages. foundExistingProject path ]
@@ -361,7 +361,7 @@ filterDependencies expr = expr
361361-- still be in the tree). If you need the resolved one, use `ensureConfig`.
362362withConfigAST :: (Expr -> Spago Expr ) -> Spago Bool
363363withConfigAST transform = do
364- path <- askEnv envConfigPath
364+ path <- view configPathL
365365 rawConfig <- liftIO $ Dhall. readRawExpr path
366366 case rawConfig of
367367 Nothing -> die [ display $ Messages. cannotFindConfig ]
0 commit comments