Skip to content

Commit 9069fdc

Browse files
committed
Merge commit 'refs/pull/64392/head' of github.com:Microsoft/vscode into pr/64392
2 parents 2803a86 + d37f1c0 commit 9069fdc

2 files changed

Lines changed: 4 additions & 8 deletions

File tree

resources/linux/snap/snapUpdate.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#!/bin/sh
22
sleep 2
3-
@@NAME@@
3+
$SNAP_NAME

src/vs/platform/update/electron-main/updateService.snap.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)