Skip to content

Commit 674242f

Browse files
committed
build: fix reuse of vscode repository regression
See #167
1 parent 3bf3108 commit 674242f

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

build/tasks.ts

+8-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const libPath = path.join(__dirname, "../lib");
1010
const vscodePath = path.join(libPath, "vscode");
1111
const pkgsPath = path.join(__dirname, "../packages");
1212
const defaultExtensionsPath = path.join(libPath, "VSCode-linux-x64/resources/app/extensions");
13-
const vscodeVersion = "1.32";
13+
const vscodeVersion = "1.32.0";
1414

1515
const buildServerBinary = register("build:server:binary", async (runner) => {
1616
await ensureInstalled();
@@ -220,11 +220,17 @@ const ensureCloned = register("vscode:clone", async (runner) => {
220220
} else {
221221
fse.mkdirpSync(libPath);
222222
runner.cwd = libPath;
223-
const clone = await runner.execute("git", ["clone", "https://github.com/microsoft/vscode", "--branch", `release/${vscodeVersion}`, "--single-branch", "--depth=1"]);
223+
const clone = await runner.execute("git", ["clone", "https://github.com/microsoft/vscode", "--branch", vscodeVersion, "--single-branch", "--depth=1"]);
224224
if (clone.exitCode !== 0) {
225225
throw new Error(`Failed to clone: ${clone.exitCode}`);
226226
}
227227
}
228+
229+
runner.cwd = vscodePath;
230+
const checkout = await runner.execute("git", ["checkout", vscodeVersion]);
231+
if (checkout.exitCode !== 0) {
232+
throw new Error(`Failed to checkout: ${checkout.stderr}`);
233+
}
228234
});
229235

230236
const ensureClean = register("vscode:clean", async (runner) => {

0 commit comments

Comments
 (0)