public void StartWrapperProcess() { string wrapperName = _wrapperExecutableNameProvider.GetWrapperExecutableName(); _wrapperProcess = _processFactory.GetProcess(wrapperName, _pipeToken.Token); _wrapperProcess.Start(); }
protected virtual void ProcessBuild(IPackageTree packageTree, IProcessFactory processFactory, string pathToBuildTool, string cmdLineArguments) { IProcess process = processFactory.GetProcess(pathToBuildTool, cmdLineArguments, packageTree.WorkingDirectory.FullName); while (true) { string line = process.GetLineOrOutput(); if (line == null) { break; } log.Info(line); } try { process.WaitForExit(); } catch (ProcessFailedException) { throw new BuildFailedException(string.Format("The build tool {0} failed building the {1} package", packageTree.BuildMetaData.BuildEngine.BuildTool, packageTree.Name)); } }
public virtual void GenerateKeyFile(IProcessFactory processFactory, IPackageTree packageTree) { string strongKey = Path.Combine(packageTree.WorkingDirectory.FullName, string.Format("{0}.snk", packageTree.Name)); string cmdLineArguments = string.Format("-k {0}", strongKey.QuotePath()); var PSI = new ProcessStartInfo("cmd.exe") { RedirectStandardInput = true, RedirectStandardOutput = true, RedirectStandardError = true, UseShellExecute = false }; var sn = GetSnExe(packageTree); IProcess process = processFactory.GetProcess(sn.ToString().QuotePath(), cmdLineArguments, packageTree.WorkingDirectory.FullName); while (true) { string line = process.GetLineOrOutput(); if (line == null) { break; } log.Info(line); } process.WaitForExit(); }
public void StartWrapperProcess() { string wrapperName = _wrapperExecutableNameProvider.GetWrapperExecutableName(); _wrapperProcess = _processFactory.GetProcess(wrapperName, _pipeToken.Token, _wrapperConfiguration.WorkingDirectory); _wrapperProcess.Start(); }
public IResponseMessage RunCommand <T>(IRequest request) { IProcess process = processFactory.GetProcess(request); IResponseMessage validationResponseMessage = process.Validate(request); if (validationResponseMessage.StatusCode != Status.FAILURE) { return(process.Process(request)); } return(validationResponseMessage); }
private ProcessWrapper StartProcess(string command, string workingDirectory) { var process = _process.GetProcess(); process.StartInfo.FileName = "/bin/bash"; process.StartInfo.Arguments = $"-c \"{command}\""; process.StartInfo.RedirectStandardOutput = true; process.StartInfo.UseShellExecute = false; process.StartInfo.CreateNoWindow = true; process.StartInfo.RedirectStandardError = true; process.StartInfo.WorkingDirectory = workingDirectory; process.Start(); return(process); }
protected virtual void ProcessBuild(IPackageTree packageTree, IProcessFactory processFactory, string pathToBuildTool, string cmdLineArguments) { IProcess process = processFactory.GetProcess(pathToBuildTool, cmdLineArguments, packageTree.WorkingDirectory.FullName); while (true) { string line = process.GetLineOrOutput(); if (line == null) break; log.Info(line); } try { process.WaitForExit(); } catch (ProcessFailedException) { throw new BuildFailedException(string.Format("The build tool {0} failed building the {1} package", packageTree.BuildMetaData.BuildEngine.BuildTool, packageTree.Name)); } }
public virtual void GenerateKeyFile(IProcessFactory processFactory, IPackageTree packageTree) { string strongKey = Path.Combine(packageTree.WorkingDirectory.FullName, string.Format("{0}.snk", packageTree.Name)); string cmdLineArguments = string.Format("-k {0}", strongKey.QuotePath()); var PSI = new ProcessStartInfo("cmd.exe") { RedirectStandardInput = true, RedirectStandardOutput = true, RedirectStandardError = true, UseShellExecute = false }; var sn = GetSnExe(packageTree); IProcess process = processFactory.GetProcess(sn.ToString().QuotePath(), cmdLineArguments, packageTree.WorkingDirectory.FullName); while (true) { string line = process.GetLineOrOutput(); if (line == null) break; log.Info(line); } process.WaitForExit(); }
public string RunCommand(string command, string args, string workingDirectory) { IProcess process = processFactory.GetProcess(command, args, workingDirectory); return(process.GetLineOrOutput()); }