public override IProcess StartProcess(ToolSettings toolSettings, ProcessSettings processSettings = null) { var toolPath = toolSettings.ToolPath; var arguments = toolSettings.GetArguments(); ControlFlow.Assert(toolPath != null, "ToolPath was not set."); ControlFlow.Assert(File.Exists(toolPath), $"ToolPath '{toolPath}' does not exist."); processSettings = processSettings ?? new ProcessSettings(); return(StartProcess( toolPath, arguments.RenderForExecution(), toolSettings.WorkingDirectory, processSettings.EnvironmentVariables, processSettings.ExecutionTimeout, processSettings.RedirectOutput, processSettings.RedirectOutput ? new Func <string, string>(arguments.Filter) : null)); }
public virtual IProcess StartProcess(ToolSettings toolSettings, ProcessSettings processSettings = null) { var toolPath = toolSettings.ToolPath; var arguments = toolSettings.GetArguments(); ControlFlow.Assert(toolPath != null, "ToolPath was not set."); ControlFlow.Assert(File.Exists(toolPath), $"ToolPath '{toolPath}' does not exist."); Logger.Info($"> {Path.GetFullPath(toolPath).DoubleQuoteIfNeeded()} {arguments.RenderForOutput()}"); processSettings = processSettings ?? new ProcessSettings(); return(StartProcessInternal( toolPath, arguments.RenderForExecution(), toolSettings.WorkingDirectory, processSettings.EnvironmentVariables, processSettings.ExecutionTimeout, processSettings.RedirectOutput, processSettings.RedirectOutput ? new Func <string, string>(arguments.Filter) : null)); }
public static IProcess StartProcess(ToolSettings toolSettings, ProcessSettings processSettings = null) { return(ProcessManager.Instance.StartProcess(toolSettings, processSettings)); }