-
Notifications
You must be signed in to change notification settings - Fork 22
Shell
Yevhen Bobrov edited this page Apr 3, 2020
·
1 revision
using static Nake.Shell;
// batch scripting is fully supported
Cmd(@"
@ECHO OFF
CD C:\source
FOR %%f IN (*.doc *.txt) DO XCOPY C:\Source\""%%f"" C:\Text /m /y
");
// optional parameters gives you more granular control
Cmd("{script}"
string[] environmentVariables = null,
string workingDirectory = null, // current directory if null (default)
bool echoOff = true,
bool ignoreStdOutErrors = false,
bool ignoreExitCode = false,
bool disableStdOutLogging = false
);
var result = await $"docker bulld -f {spec} .";
WriteLine(result.ExitCode);
result.StdOut.ForEach(WriteLine);