Merge commit 'refs/pull/64392/head' of github.com:Microsoft/vscode into pr/64392

pull/65461/head^2
Joao Moreno 2018-12-20 09:59:18 +01:00
commit 9069fdcfc6
2 changed files with 4 additions and 8 deletions

View File

@ -1,3 +1,3 @@
#!/bin/sh
sleep 2
@@NAME@@
$SNAP_NAME

View File

@ -164,7 +164,7 @@ export class SnapUpdateService extends AbstractUpdateService2 {
this.isUpdateAvailable().then(result => {
if (result) {
this.setState(State.Ready({ version: 'something', productVersion: 'someting' }));
this.setState(State.Ready({ version: 'something', productVersion: 'something' }));
} else {
/* __GDPR__
"update:notAvailable" : {
@ -191,12 +191,8 @@ export class SnapUpdateService extends AbstractUpdateService2 {
protected doQuitAndInstall(): void {
this.logService.trace('update#quitAndInstall(): running raw#quitAndInstall()');
if (typeof process.env.SNAP === 'undefined') {
return;
}
// Allow 3 seconds for VS Code to close
spawn('bash', ['-c', path.join(process.env.SNAP, `usr/share/${product.applicationName}/snapUpdate.sh`)], {
spawn('bash', ['-c', path.join(process.env.SNAP!, `usr/share/${product.applicationName}/snapUpdate.sh`)], {
detached: true,
stdio: ['ignore', 'ignore', 'ignore']
});
@ -204,7 +200,7 @@ export class SnapUpdateService extends AbstractUpdateService2 {
private isUpdateAvailable(): Promise<boolean> {
return new Promise((c, e) => {
realpath(`/snap/${product.applicationName}/current`, (err, resolvedCurrentSnapPath) => {
realpath(`${path.dirname(process.env.SNAP!)}/current`, (err, resolvedCurrentSnapPath) => {
if (err) { return e(err); }
const currentRevision = path.basename(resolvedCurrentSnapPath);