Skip to content

Commit

Permalink
better handling for failed project loading
Browse files Browse the repository at this point in the history
  • Loading branch information
dawedawe committed Nov 9, 2023
1 parent 15d7e44 commit 2248ecc
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/FSharp.Analyzers.Cli/Program.fs
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,11 @@ let loadProject toolsPath projPath =
async {
let loader = WorkspaceLoader.Create(toolsPath)
let parsed = loader.LoadProjects [ projPath ] |> Seq.toList

if parsed.IsEmpty then
printError $"Failed to load project '{projPath}'"
exit 1

let fcsPo = FCS.mapToFSharpProjectOptions parsed.Head parsed

return fcsPo
Expand Down

0 comments on commit 2248ecc

Please sign in to comment.