private static void HandleUpdaterReturnValue(ManagedProgram program) { if (program.ExitCode == 0) { APIUpdaterHelper.UpdateFilesInVCIfNeeded(); return; } ScriptUpdatingManager.ReportExpectedUpdateFailure(); if (program.ExitCode > 0) { APIUpdaterHelper.ReportAPIUpdaterFailure(program.GetErrorOutput()); } else { APIUpdaterHelper.ReportAPIUpdaterCrash(program.GetErrorOutput()); } }
private static void RunUpdatingProgram(string executable, string arguments) { string executable2 = EditorApplication.applicationContentsPath + "/Tools/ScriptUpdater/" + executable; ManagedProgram managedProgram = new ManagedProgram(MonoInstallationFinder.GetMonoInstallation("MonoBleedingEdge"), "4.5", executable2, arguments); managedProgram.LogProcessStartInfo(); managedProgram.Start(); managedProgram.WaitForExit(); Console.WriteLine(string.Join(Environment.NewLine, managedProgram.GetStandardOutput())); if (managedProgram.ExitCode == 0) { APIUpdaterHelper.UpdateFilesInVCIfNeeded(); } else { APIUpdaterHelper.ReportAPIUpdaterFailure(managedProgram.GetErrorOutput()); } }
private static void HandleUpdaterReturnValue(ManagedProgram program) { if (program.ExitCode == 0) { Console.WriteLine(string.Join(Environment.NewLine, program.GetErrorOutput())); APIUpdaterHelper.UpdateFilesInVCIfNeeded(); } else { ScriptUpdatingManager.ReportExpectedUpdateFailure(); if (program.ExitCode > 0) { APIUpdaterHelper.ReportAPIUpdaterFailure(program.GetErrorOutput()); } else { APIUpdaterHelper.ReportAPIUpdaterCrash(program.GetErrorOutput()); } } }