Skip to content

Commit

Permalink
Use Fable compatible API for logging plugin load errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxime Mangel committed Aug 22, 2023
1 parent cfc9c9c commit cd318d4
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/Fable.Transforms/State.fs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ type Assemblies(getPlugin, fsharpAssemblies: FSharpAssembly list) =
$"Could not scan {path} for Fable plugins, skipping this assembly"

Console.ForegroundColor <- ConsoleColor.Gray
Console.Error.WriteLine(errorMessage)
Console.WriteLine(errorMessage)
Console.ResetColor()
hasSkippedAssembly <- true
false
Expand All @@ -65,13 +65,10 @@ type Assemblies(getPlugin, fsharpAssemblies: FSharpAssembly list) =
]
|> String.concat "\n"

#if FABLE_COMPILER
eprintfn "%s" errorMessage
#else
Console.ForegroundColor <- ConsoleColor.DarkRed
Console.Error.WriteLine(errorMessage)
Console.WriteLine(errorMessage)
Console.ResetColor()
#endif

raise ex

assemblies.Add(path, asm)
Expand Down

0 comments on commit cd318d4

Please sign in to comment.