Skip to content

Commit 285c7b1

Browse files
committed
scripts/make: ignore unitTests warns if legacy
Somehow, unit tests started to throw strings to StdErr (like 'WARNING: The runtime version supported by this application is unavailable.') while using dotnet6 it doesn't happen so we ignore the warnings only if running in legacy mode. This should fix CI after the last merge.
1 parent e4dfea9 commit 285c7b1

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

scripts/make.fsx

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,8 +433,21 @@ match maybeTarget with
433433
}
434434
#endif
435435

436-
Process.Execute(runnerCommand, Echo.All).UnwrapDefault()
436+
let procResult = Process.Execute(runnerCommand, Echo.All)
437+
#if !LEGACY_FRAMEWORK
438+
procResult.UnwrapDefault()
437439
|> ignore<string>
440+
#else
441+
// in legacy mode, warnings (output to StdErr) happen even if exitCode=0
442+
match procResult.Result with
443+
| ProcessResultState.Error(_exitCode, _output) ->
444+
Console.WriteLine()
445+
Console.Out.Flush()
446+
447+
failwith "Unit tests failed ^"
448+
| _ ->
449+
()
450+
#endif
438451

439452
| Some("install") ->
440453
let buildConfig = BinaryConfig.Release

0 commit comments

Comments
 (0)