@@ -164,7 +164,7 @@ export class SnapUpdateService extends AbstractUpdateService2 {
164164
165165 this . isUpdateAvailable ( ) . then ( result => {
166166 if ( result ) {
167- this . setState ( State . Ready ( { version : 'something' , productVersion : 'someting ' } ) ) ;
167+ this . setState ( State . Ready ( { version : 'something' , productVersion : 'something ' } ) ) ;
168168 } else {
169169 /* __GDPR__
170170 "update:notAvailable" : {
@@ -191,20 +191,16 @@ export class SnapUpdateService extends AbstractUpdateService2 {
191191 protected doQuitAndInstall ( ) : void {
192192 this . logService . trace ( 'update#quitAndInstall(): running raw#quitAndInstall()' ) ;
193193
194- if ( typeof process . env . SNAP === 'undefined' ) {
195- return ;
196- }
197-
198194 // Allow 3 seconds for VS Code to close
199- spawn ( 'bash' , [ '-c' , path . join ( process . env . SNAP , `usr/share/${ product . applicationName } /snapUpdate.sh` ) ] , {
195+ spawn ( 'bash' , [ '-c' , path . join ( process . env . SNAP ! , `usr/share/${ product . applicationName } /snapUpdate.sh` ) ] , {
200196 detached : true ,
201197 stdio : [ 'ignore' , 'ignore' , 'ignore' ]
202198 } ) ;
203199 }
204200
205201 private isUpdateAvailable ( ) : Promise < boolean > {
206202 return new Promise ( ( c , e ) => {
207- realpath ( `/snap/ ${ product . applicationName } /current` , ( err , resolvedCurrentSnapPath ) => {
203+ realpath ( `${ path . dirname ( process . env . SNAP ! ) } /current` , ( err , resolvedCurrentSnapPath ) => {
208204 if ( err ) { return e ( err ) ; }
209205
210206 const currentRevision = path . basename ( resolvedCurrentSnapPath ) ;
0 commit comments