Skip to content

Commit 2b0f003

Browse files
committed
Fix yarn task for windows
1 parent bdb136e commit 2b0f003

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

build/tasks.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import * as os from "os";
55
import * as path from "path";
66
import * as zlib from "zlib";
77

8+
const isWin = os.platform() === "win32";
89
const libPath = path.join(__dirname, "../lib");
910
const vscodePath = path.join(libPath, "vscode");
1011
const pkgsPath = path.join(__dirname, "../packages");
@@ -84,7 +85,7 @@ const buildServerBinaryCopy = register("build:server:binary:copy", async (runner
8485
const nodePtyModule = path.join(pkgsPath, "protocol", "node_modules", "node-pty-prebuilt", "build", "Release", "pty.node");
8586
const spdlogModule = path.join(pkgsPath, "protocol", "node_modules", "spdlog", "build", "Release", "spdlog.node");
8687
let ripgrepPath = path.join(pkgsPath, "..", "lib", "vscode", "node_modules", "vscode-ripgrep", "bin", "rg");
87-
if (os.platform() === "win32") {
88+
if (isWin) {
8889
ripgrepPath += ".exe";
8990
}
9091

@@ -188,7 +189,7 @@ const ensureInstalled = register("vscode:install", async (runner) => {
188189
await ensureCloned();
189190

190191
runner.cwd = vscodePath;
191-
const install = await runner.execute("yarn", []);
192+
const install = await runner.execute(isWin ? "yarn.cmd" : "yarn", []);
192193
if (install.exitCode !== 0) {
193194
throw new Error(`Failed to install vscode dependencies: ${install.stderr}`);
194195
}

0 commit comments

Comments
 (0)