Skip to content

Commit 5f56746

Browse files
committed
fix: missing -d ${WORKDIR} parameter for wt.exe (sourcegit-scm#490)
1 parent cb2caa0 commit 5f56746

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Native/Windows.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,11 @@ public void OpenTerminal(string workdir)
155155
var startInfo = new ProcessStartInfo();
156156
startInfo.WorkingDirectory = workdir;
157157
startInfo.FileName = OS.ShellOrTerminal;
158+
159+
// Directly launching `Windows Terminal` need to specify the `-d` parameter
160+
if (OS.ShellOrTerminal.EndsWith("wt.exe", StringComparison.OrdinalIgnoreCase))
161+
startInfo.Arguments = $"-d \"{workdir}\"";
162+
158163
Process.Start(startInfo);
159164
}
160165

0 commit comments

Comments
 (0)