Skip to content

Commit da9dee7

Browse files
author
bluedrink9
committed
feat: respect CURSORLESS_VSCODE_COMMAND in generateTestSubsetFile script
Otherwise this breaks on systems without code installed
1 parent 2fd5b85 commit da9dee7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/test-harness/src/scripts/generateTestSubsetFile.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ languages/go/
2020
*/
2121
function run() {
2222
const testSubsetGrepPath = testSubsetFilePath();
23+
// Use CURSORLESS_VSCODE_COMMAND environment variable if set, otherwise default to 'code'
24+
const vscodeCommand = process.env.CURSORLESS_VSCODE_COMMAND || "code";
2325

2426
const exists = fs.existsSync(testSubsetGrepPath);
2527

@@ -28,7 +30,7 @@ function run() {
2830
}
2931

3032
if (!exists || process.argv.includes("--always-open")) {
31-
child.execSync(`code ${testSubsetGrepPath}`);
33+
child.execSync(`${vscodeCommand} ${testSubsetGrepPath}`);
3234
}
3335

3436
if (!exists && process.argv.includes("--fail-if-not-exists")) {

0 commit comments

Comments
 (0)