@@ -2,7 +2,7 @@ import * as cp from 'child_process';
22import * as path from 'path' ;
33
44import { downloadAndUnzipVSCode , resolveCliArgsFromVSCodeExecutablePath , runTests } from '@vscode/test-electron' ;
5- import { PVSC_EXTENSION_ID_FOR_TESTS } from './constants' ;
5+ import { PVSC_ENVS_EXTENSION_ID_FOR_TESTS , PVSC_EXTENSION_ID_FOR_TESTS } from './constants' ;
66import { OSType , getOSType } from '../extension/common/platform' ;
77
88async function main ( ) {
@@ -20,16 +20,24 @@ async function main() {
2020 // Use cp.spawn / cp.exec for custom setup
2121 if ( getOSType ( ) === OSType . Windows ) {
2222 const exec = path . basename ( cliPath ) ;
23- cp . spawnSync ( exec , [ ...args , '--install-extension' , PVSC_EXTENSION_ID_FOR_TESTS ] , {
24- cwd : path . dirname ( cliPath ) ,
25- encoding : 'utf-8' ,
26- stdio : 'inherit' ,
27- } ) ;
23+ cp . spawnSync (
24+ exec ,
25+ [ ...args , '--install-extension' , PVSC_EXTENSION_ID_FOR_TESTS , PVSC_ENVS_EXTENSION_ID_FOR_TESTS ] ,
26+ {
27+ cwd : path . dirname ( cliPath ) ,
28+ encoding : 'utf-8' ,
29+ stdio : 'inherit' ,
30+ } ,
31+ ) ;
2832 } else {
29- cp . spawnSync ( cliPath , [ ...args , '--install-extension' , PVSC_EXTENSION_ID_FOR_TESTS ] , {
30- encoding : 'utf-8' ,
31- stdio : 'inherit' ,
32- } ) ;
33+ cp . spawnSync (
34+ cliPath ,
35+ [ ...args , '--install-extension' , PVSC_EXTENSION_ID_FOR_TESTS , PVSC_ENVS_EXTENSION_ID_FOR_TESTS ] ,
36+ {
37+ encoding : 'utf-8' ,
38+ stdio : 'inherit' ,
39+ } ,
40+ ) ;
3341 }
3442
3543 // Run the extension test
0 commit comments