Skip to content

Commit dc422df

Browse files
Clamp version
1 parent 6684bd2 commit dc422df

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

packages/test-harness/src/launchVscodeAndRunTests.ts

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {
99
runTests,
1010
} from "@vscode/test-electron";
1111
import { sync } from "cross-spawn";
12-
// import * as os from "node:os";
12+
import * as os from "node:os";
1313
import * as path from "node:path";
1414

1515
/**
@@ -27,15 +27,19 @@ export async function launchVscodeAndRunTests(extensionTestsPath: string) {
2727
"packages/cursorless-vscode/dist",
2828
);
2929

30-
// const crashDir = getEnvironmentVariableStrict("VSCODE_CRASH_DIR");
31-
// const logsDir = getEnvironmentVariableStrict("VSCODE_LOGS_DIR");
30+
const crashDir = getEnvironmentVariableStrict("VSCODE_CRASH_DIR");
31+
const logsDir = getEnvironmentVariableStrict("VSCODE_LOGS_DIR");
3232
const useLegacyVscode =
3333
getEnvironmentVariableStrict("APP_VERSION") === "legacy";
3434

3535
// NB: We include the exact version here instead of in `test.yml` so that
3636
// we don't have to update the branch protection rules every time we bump
3737
// the legacy VSCode version.
38-
const vscodeVersion = useLegacyVscode ? "1.82.0" : "stable";
38+
const vscodeVersion = useLegacyVscode
39+
? "1.82.0"
40+
: os.platform() === "win32"
41+
? "stable"
42+
: "1.97.2";
3943
const vscodeExecutablePath = await downloadAndUnzipVSCode(vscodeVersion);
4044
const [cli, ...args] =
4145
resolveCliArgsFromVSCodeExecutablePath(vscodeExecutablePath);
@@ -74,10 +78,10 @@ export async function launchVscodeAndRunTests(extensionTestsPath: string) {
7478
// don't bother. Can be re-enabled if we ever need it; on windows it only
7579
// hangs some of the time, so might be enough to get a crash dump when you
7680
// need it.
77-
// launchArgs:
78-
// useLegacyVscode || os.platform() === "win32"
79-
// ? undefined
80-
// : [`--crash-reporter-directory=${crashDir}`, `--logsPath=${logsDir}`],
81+
launchArgs:
82+
useLegacyVscode || os.platform() === "win32"
83+
? undefined
84+
: [`--crash-reporter-directory=${crashDir}`, `--logsPath=${logsDir}`],
8185
});
8286

8387
console.log(`Returned from "runTests" with value: ${code}`);

0 commit comments

Comments
 (0)