Skip to content

Commit a7ef589

Browse files
committed
update StartInfo arguments if cmd shell type
1 parent 8cf9390 commit a7ef589

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Flow.Launcher/PublicAPIInstance.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,9 @@ public void OpenSettingDialog()
109109

110110
public void ShellRun(string cmd, string filename = "cmd.exe")
111111
{
112-
var startInfo = ShellCommand.SetProcessStartInfo(filename, arguments: $"/C {cmd}", createNoWindow: true);
112+
var args = filename == "cmd.exe" ? $"/C {cmd}" : $"{cmd}";
113+
114+
var startInfo = ShellCommand.SetProcessStartInfo(filename, arguments: args, createNoWindow: true);
113115
ShellCommand.Execute(startInfo);
114116
}
115117

0 commit comments

Comments
 (0)