Skip to content

Commit 12fd120

Browse files
authored
fix: Set -ExecutionPolicy Bypass on PowerShell script execution (#11)
1 parent c6ed311 commit 12fd120

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

lib/GenerateConsoleCtrlEvent.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,13 @@ const GenerateConsoleCtrlEvent = kernel32
2828
(...args) => promisify(cp.execFile)(...args).then(({ stdout }) => stdout),
2929
(args) => [
3030
"powershell.exe",
31-
["-File", path.join(__dirname, "..", "generate-ctrl-event.ps1"), ...args],
31+
[
32+
"-ExecutionPolicy",
33+
"Bypass",
34+
"-File",
35+
path.join(__dirname, "..", "generate-ctrl-event.ps1"),
36+
...args,
37+
],
3238
{ stdio: ["ignore", "pipe", "pipe"] },
3339
],
3440
(buffer) => {

0 commit comments

Comments
 (0)