Skip to content

Commit a2065ec

Browse files
committed
fix shellintegration
1 parent 1307112 commit a2065ec

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/OneWare.Terminal/ShellIntegration.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,11 @@ private static SpawnConfig CreatePowerShellConfig(string shellExecutable)
6363

6464
// The arguments string must contain the full command line because the ConPTY
6565
// provider uses it verbatim when it is not empty.
66+
// -ExecutionPolicy Bypass is required so the integration script can be dot-sourced
67+
// regardless of the system execution policy (matches VS Code behaviour).
6668
var exe = Path.GetFileName(shellExecutable);
6769
return new SpawnConfig(
68-
$"{exe} -NoLogo -NoProfile -NoExit -Command \". '{escaped}'\"", null);
70+
$"{exe} -NoLogo -NoProfile -NoExit -ExecutionPolicy Bypass -Command \". '{escaped}'\"", null);
6971
}
7072

7173
private static readonly Lock WriteLock = new();

0 commit comments

Comments
 (0)