Skip to content

Commit 3fcc6e5

Browse files
committed
fix(gateway): open config on Windows
1 parent c768a9e commit 3fcc6e5

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/gateway/server-methods/config.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,14 @@ describe("resolveConfigOpenCommand", () => {
7474
});
7575
});
7676

77-
it("uses a quoted PowerShell literal on Windows", () => {
77+
it("uses Start-Process FilePath with a quoted PowerShell literal on Windows", () => {
7878
expect(resolveConfigOpenCommand(String.raw`C:\tmp\o'hai & calc.json`, "win32")).toEqual({
7979
command: "powershell.exe",
8080
args: [
8181
"-NoProfile",
8282
"-NonInteractive",
8383
"-Command",
84-
String.raw`Start-Process -LiteralPath 'C:\tmp\o''hai & calc.json'`,
84+
String.raw`Start-Process -FilePath 'C:\tmp\o''hai & calc.json'`,
8585
],
8686
});
8787
});

src/gateway/server-methods/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ export function resolveConfigOpenCommand(
181181
"-NoProfile",
182182
"-NonInteractive",
183183
"-Command",
184-
`Start-Process -LiteralPath '${escapePowerShellSingleQuotedString(configPath)}'`,
184+
`Start-Process -FilePath '${escapePowerShellSingleQuotedString(configPath)}'`,
185185
],
186186
};
187187
}

0 commit comments

Comments
 (0)