From 91edfb3634294cf34d0130fc4d51a624a67b6b6a Mon Sep 17 00:00:00 2001 From: pascal910107 Date: Mon, 14 Nov 2022 20:59:27 +0800 Subject: [PATCH] Change the path in the command --- src/codeManager.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/codeManager.ts b/src/codeManager.ts index 3de6e2e..a69dd2c 100644 --- a/src/codeManager.ts +++ b/src/codeManager.ts @@ -426,6 +426,10 @@ export class CodeManager implements vscode.Disposable { .replace(/\\/g, "/"); } else if (windowsShell && windowsShell.toLowerCase().indexOf("bash") > -1 && windowsShell.toLowerCase().indexOf("windows") > -1) { command = command.replace(/([A-Za-z]):\\/g, this.replacer).replace(/\\/g, "/"); + } else if (windowsShell && windowsShell.toLowerCase().indexOf("wsl") > -1) { + command = command.replace(/([A-Za-z]):\\/g, this.replacer).replace(/\\/g, "/"); + } else if (windowsShell && windowsShell.toLowerCase().indexOf("bash") > -1 && command.includes("&&")) { + command = command.replace(/\\/g, "/"); } } return command;