8000 adjust wsl parameter · purocean/vscode-leetcode@6fe4684 · GitHub
[go: up one dir, main page]

Skip to content

Commit 6fe4684

Browse files
committed
adjust wsl parameter
1 parent d19d2c4 commit 6fe4684

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/leetCodeManager.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class LeetCodeManager extends EventEmitter implements ILeetCodeManager {
4646
let result: string = "";
4747

4848
const childProc: cp.ChildProcess = wsl.useWsl()
49-
? cp.spawn("wsl", ["--", "node", leetCodeBinaryPath, "user", "-l"], { shell: true })
49+
? cp.spawn("wsl", ["node", leetCodeBinaryPath, "user", "-l"], { shell: true })
5050
: cp.spawn("node", [leetCodeBinaryPath, "user", "-l"], { shell: true });
5151

5252
childProc.stdout.on("data", (data: string | Buffer) => {

src/utils/cpUtils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export async function executeCommand(channel: vscode.OutputChannel, command: str
99
let result: string = "";
1010

1111
const childProc: cp.ChildProcess = wsl.useWsl()
12-
? cp.spawn("wsl", ["--", command].concat(args), options)
12+
? cp.spawn("wsl", [command].concat(args), options)
1313
: cp.spawn(command, args, options);
1414

1515
childProc.stdout.on("data", (data: string | Buffer) => {

src/utils/wslUtils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ export function useWsl(): boolean {
1010
}
1111

1212
export function toWslPath(path: string): string {
13-
return cp.execFileSync("wsl", ["--", "wslpath", "-u", `${path.replace(/\\/g, "/")}`]).toString().trim();
13+
return cp.execFileSync("wsl", ["wslpath", "-u", `${path.replace(/\\/g, "/")}`]).toString().trim();
1414
}
1515

1616
export function toWinPath(path: string): string {
17-
return cp.execFileSync("wsl", ["--", "wslpath", "-w", path]).toString().trim();
17+
return cp.execFileSync("wsl", ["wslpath", "-w", path]).toString().trim();
1818
}

0 commit comments

Comments
 (0)
0