mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-18 22:29:56 +01:00
fix badge, win32 flag file
This commit is contained in:
@@ -164,12 +164,18 @@ export class Win32AutoUpdaterImpl extends EventEmitter implements IAutoUpdater {
|
||||
return this.cachePath.then(cachePath => {
|
||||
this.currentUpdate.updateFilePath = path.join(cachePath, `CodeSetup-${product.quality}-${this.currentUpdate.version}.flag`);
|
||||
|
||||
return pfs.touch(this.currentUpdate.updateFilePath).then(() => {
|
||||
spawn(this.currentUpdate.packagePath, ['/verysilent', '/update=FILENAME', '/nocloseapplications', '/mergetasks=runcode,!desktopicon,!quicklaunchicon'], {
|
||||
return pfs.writeFile(this.currentUpdate.updateFilePath, 'flag').then(() => {
|
||||
const child = spawn(this.currentUpdate.packagePath, ['/verysilent', `/update="${this.currentUpdate.updateFilePath}"`, '/nocloseapplications', '/mergetasks=runcode,!desktopicon,!quicklaunchicon'], {
|
||||
detached: true,
|
||||
stdio: ['ignore', 'ignore', 'ignore']
|
||||
});
|
||||
|
||||
child.once('exit', () => {
|
||||
this.emit('update-not-available');
|
||||
this.currentRequest = null;
|
||||
this.currentUpdate = null;
|
||||
});
|
||||
|
||||
const readyMutexName = `${product.win32MutexName}-ready`;
|
||||
const isActive = (require.__$__nodeRequire('windows-mutex') as any).isActive;
|
||||
|
||||
|
||||
@@ -355,7 +355,7 @@ export class UpdateContribution implements IGlobalActivity {
|
||||
|
||||
const isUpdateAvailable = isLinux
|
||||
? state === UpdateState.UpdateAvailable
|
||||
: state === UpdateState.UpdateDownloaded;
|
||||
: state === UpdateState.UpdateDownloaded || state === UpdateState.UpdateReady;
|
||||
|
||||
if (isUpdateAvailable) {
|
||||
const badge = new NumberBadge(1, () => nls.localize('updateIsReady', "New {0} update available.", product.nameShort));
|
||||
|
||||
Reference in New Issue
Block a user