Summary
Starts the process resource that is specified by the filename and settings.
Syntax
[CakeMethodAlias]
public static IProcess StartAndReturnProcess(this ICakeContext context, FilePath fileName, ProcessSettings settings)
Examples
using(var process = StartAndReturnProcess("ping", new ProcessSettings{ Arguments = "localhost" }))
{
process.WaitForExit();
// This should output 0 as valid arguments supplied
Information("Exit code: {0}", process.GetExitCode());
}
Attributes
Parameters
Return Value
Type |
Description |
IProcess |
The newly started process. |