Skip to content

Commit 3786b97

Browse files
committed
Add doQuitAndInstall impl for snap/linux
1 parent 588675b commit 3786b97

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import { shell } from 'electron';
1919
import { realpath } from 'vs/base/node/pfs';
2020
import product from 'vs/platform/node/product';
2121
import * as path from 'path';
22+
import { spawn } from 'child_process';
2223

2324
export class LinuxUpdateService extends AbstractUpdateService {
2425

@@ -102,4 +103,14 @@ export class LinuxUpdateService extends AbstractUpdateService {
102103

103104
return TPromise.as(null);
104105
}
106+
107+
protected doQuitAndInstall(): void {
108+
this.logService.trace('update#quitAndInstall(): running raw#quitAndInstall()');
109+
110+
// Allow 3 seconds for VS Code to close
111+
spawn('bash', ['-c', `'sleep 3; /snap/${product.applicationName}/current &'`], {
112+
detached: true,
113+
stdio: ['ignore', 'ignore', 'ignore']
114+
});
115+
}
105116
}

0 commit comments

Comments
 (0)