File tree Expand file tree Collapse file tree 2 files changed +18
-3
lines changed
extensions/vscode/scripts Expand file tree Collapse file tree 2 files changed +18
-3
lines changed Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff line change 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' ;
1317import { 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
1731console . log ( `Downloading VS Code (${ version } ) for integration tests...` ) ;
1832
You can’t perform that action at this time.
0 commit comments