Skip to content

Commit fa7ad2d

Browse files
committed
Address latest PR review feedback
1 parent e78647c commit fa7ad2d

File tree

2 files changed

+18
-3
lines changed

2 files changed

+18
-3
lines changed

.github/workflows/copilot-setup-steps.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ jobs:
6565
- name: Copilot Setup - Install xvfb and VS Code dependencies
6666
run: |
6767
sudo apt-get update
68-
sudo apt-get install -y xvfb libasound2t64 libgbm1 libgtk-3-0 libxshmfence1
68+
sudo apt-get install -y xvfb libgbm1 libgtk-3-0 libxshmfence1
69+
sudo apt-get install -y libasound2t64 || sudo apt-get install -y libasound2
6970
7071
- name: Copilot Setup - Build server (extension dependency)
7172
run: npm run build -w server

extensions/vscode/scripts/download-vscode.js

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,26 @@
77
* to ensure VS Code is available before running tests.
88
*
99
* Usage: node scripts/download-vscode.js [version]
10-
* Default version: stable
10+
*
11+
* The version defaults to the minimum VS Code version from engines.vscode in
12+
* package.json (e.g. "^1.110.0" -> "1.110.0"). Pass "stable" or an explicit
13+
* version to override.
1114
*/
1215

16+
import { readFileSync } from 'node:fs';
1317
import { downloadAndUnzipVSCode } from '@vscode/test-electron';
1418

15-
const version = process.argv[2] || 'stable';
19+
function getEnginesVscodeVersion() {
20+
const pkg = JSON.parse(readFileSync(new URL('../package.json', import.meta.url), 'utf-8'));
21+
const range = pkg.engines?.vscode;
22+
if (range) {
23+
const match = range.match(/(\d+\.\d+\.\d+)/);
24+
if (match) return match[1];
25+
}
26+
return 'stable';
27+
}
28+
29+
const version = process.argv[2] || getEnginesVscodeVersion();
1630

1731
console.log(`Downloading VS Code (${version}) for integration tests...`);
1832

0 commit comments

Comments
 (0)