private static IProcess StartProcess(UnityBaseSettings unitySettings) { try { return(ProcessTasks.StartProcess(unitySettings)); } catch (Exception) { AssertWatcherStopped(); throw; } }
private static void AssertProcess(IProcess process, UnityBaseSettings settings) { process.AssertWaitForExit(); AssertWatcherStopped(); if (process.ExitCode == 0) { return; } var message = new StringBuilder() .AppendLine($"Process '{Path.GetFileName(process.FileName)}' exited with code {process.ExitCode}. Verify the invocation.") .AppendLine($"> {process.FileName.DoubleQuoteIfNeeded()} {process.Arguments}") .ToString(); if (settings.StableExitCodes.Any(x => x == process.ExitCode)) { Logger.Warn(message); } else { ControlFlow.Fail(message); } }