Skip to content

Commit 82afc46

Browse files
harjothkharavincentkoc
authored andcommitted
fix(config): use Start-Process -FilePath for Windows config opener (#90157)
1 parent aa935dd commit 82afc46

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 a quoted PowerShell FilePath 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
@@ -183,7 +183,7 @@ export function resolveConfigOpenCommand(
183183
"-NoProfile",
184184
"-NonInteractive",
185185
"-Command",
186-
`Start-Process -LiteralPath '${escapePowerShellSingleQuotedString(configPath)}'`,
186+
`Start-Process -FilePath '${escapePowerShellSingleQuotedString(configPath)}'`,
187187
],
188188
};
189189
}

0 commit comments

Comments
 (0)