@@ -22,6 +22,7 @@ import { Range } from 'vscode-languageclient';
2222import { ChildProcess , spawn , execSync } from 'child_process' ;
2323import * as tmp from 'tmp' ;
2424import { getTargetBuildInfo } from '../githubAPI' ;
25+ import { PackageVersion } from '../packageVersion' ;
2526
2627let prevCrashFile : string ;
2728let clients : ClientCollection ;
@@ -266,7 +267,25 @@ async function installVsix(vsixLocation: string, updateChannel: string): Promise
266267 return Promise . reject ( new Error ( 'Failed to find VS Code script' ) ) ;
267268 }
268269
269- // Install the VSIX
270+ // 1.28.0 changes the CLI for making installations
271+ let userVersion : PackageVersion = new PackageVersion ( vscode . version ) ;
272+ let breakingVersion : PackageVersion = new PackageVersion ( '1.28.0' ) ;
273+ if ( userVersion . isGreaterThan ( breakingVersion , 'insider' ) ) {
274+ return new Promise < void > ( ( resolve , reject ) => {
275+ let process : ChildProcess ;
276+ try {
277+ process = spawn ( vsCodeScriptPath , [ '--install-extension' , vsixLocation , '--force' ] ) ;
278+ if ( process . pid === undefined ) {
279+ throw new Error ( ) ;
280+ }
281+ } catch ( error ) {
282+ reject ( new Error ( 'Failed to launch VS Code script process for installation' ) ) ;
283+ return ;
284+ }
285+ resolve ( ) ;
286+ } ) ;
287+ }
288+
270289 return new Promise < void > ( ( resolve , reject ) => {
271290 let process : ChildProcess ;
272291 try {
0 commit comments