summaryrefslogtreecommitdiff
path: root/src/marlin.agents.shell/CommandRunner.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/marlin.agents.shell/CommandRunner.cs')
-rw-r--r--src/marlin.agents.shell/CommandRunner.cs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/marlin.agents.shell/CommandRunner.cs b/src/marlin.agents.shell/CommandRunner.cs
index d4fcbb3..90c0a58 100644
--- a/src/marlin.agents.shell/CommandRunner.cs
+++ b/src/marlin.agents.shell/CommandRunner.cs
@@ -2,7 +2,7 @@ using System.Diagnostics;
public static class CommandRunner
{
- public static async Task<int> RunAsync(string command, Action<string> onStdout, Action<string> onStderr)
+ public static async Task<int> RunAsync(string command, string workingDir, Action<string> onStdout, Action<string> onStderr)
{
var psi = new ProcessStartInfo
{
@@ -11,7 +11,8 @@ public static class CommandRunner
RedirectStandardOutput = true,
RedirectStandardError = true,
UseShellExecute = false,
- CreateNoWindow = true
+ CreateNoWindow = true,
+ WorkingDirectory = workingDir
};
var process = new Process { StartInfo = psi };