When using DotNetCliRunner.ExecuteWithCallbacks or DotNetCliRunner.ExecuteAndCaptureOutput either in dotnet-scaffold or elsewhere, Process.Start() can throw on a myriad of reasons.
Found this when had another dotnet global tool installed Sarif.PatternMatcher.Cli and this method would throw and exit when trying to start the tool's process.
We should catch the exception and continue execution
dotnet-scaffold would fail on getting all the commands due to this failure instead of returning all found commands.
When using
DotNetCliRunner.ExecuteWithCallbacks
orDotNetCliRunner.ExecuteAndCaptureOutput
either in dotnet-scaffold or elsewhere,Process.Start()
can throw on a myriad of reasons.Sarif.PatternMatcher.Cli
and this method would throw and exit when trying to start the tool's process.dotnet-scaffold
would fail on getting all the commands due to this failure instead of returning all found commands.