Skip to content

Commit

Permalink
Provide better error context when the build root is off
Browse files Browse the repository at this point in the history
  • Loading branch information
supermario committed Oct 27, 2023
1 parent f68b018 commit de92025
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ext-common/Ext/Common.hs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@ getProjectRoot tag = do
-- @TODO this doesn't seem right... we have creations of this path in prod root...
-- should we error out instead? Or just return the current directory?
-- pure "<unset-project-root>"
error "Fatal: I don't know where the project root is! This should generally be impossible, unless you've accidentally run lamdera in a folder that has no parent folders with an elm.json."
subDir <- Dir.getCurrentDirectory
error $ "Fatal: I don't know where the project root is! This should generally be impossible, unless you've accidentally run lamdera in a folder that has no parent folders with an elm.json. My current working directory is " <> subDir <> "."
ProjectRootSet root -> do
-- debug $ "🏠 read project root [" <> tag <> "]: " <> root
pure root
Expand Down

0 comments on commit de92025

Please sign in to comment.