Skip to content

Commit e93a03a

Browse files
fwcdsnoyberg
andcommitted
Improve error handling for missing Hadrian path
Co-authored-by: Michael Snoyman <[email protected]>
1 parent fbb8174 commit e93a03a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Stack/Setup.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -841,7 +841,7 @@ buildGhcFromSource getSetupInfo' installed (CompilerRepository url) commitId fla
841841
| otherwise = hadrianScriptsPosix
842842

843843
foundHadrianPaths <- filterM doesFileExist $ (cwd </>) <$> hadrianScripts
844-
let hadrianPath = fromMaybe (error "No Hadrian build script found") $ listToMaybe foundHadrianPaths
844+
hadrianPath <- maybe (throwString "No Hadrian build script found") pure $ listToMaybe foundHadrianPaths
845845

846846
logSticky $ "Building GHC from source with `"
847847
<> RIO.display flavour

0 commit comments

Comments
 (0)