Skip to content

Commit

Permalink
Don't veto shutdown in web mode (2025.01 backport of #6091) (#6092)
Browse files Browse the repository at this point in the history
This PR is a backport of #6091
to the 2025.01 release branch; see that PR for notes.

---------

Co-authored-by: petetronic <[email protected]>
  • Loading branch information
jmcphers and petetronic authored Jan 29, 2025
1 parent a73adcb commit 24e3c76
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import { ICommandService } from '../../../../platform/commands/common/commands.j
import { URI } from '../../../../base/common/uri.js';
import { IWorkspaceContextService, WorkbenchState } from '../../../../platform/workspace/common/workspace.js';
import { IPositronNewProjectService } from '../../positronNewProject/common/positronNewProject.js';
import { isWeb } from '../../../../base/common/platform.js';

interface ILanguageRuntimeProviderMetadata {
languageId: string;
Expand Down Expand Up @@ -306,7 +307,14 @@ export class RuntimeStartupService extends Disposable implements IRuntimeStartup
// storage, but it is possible that this workspace will be
// re-opened without an interleaving quit (e.g. if multiple
// Positron windows are open).
e.veto(this.clearWorkspaceSessions(), 'positron.runtimeStartup.clearWorkspaceSessions');
//
// We don't do this in web mode because async shutdown
// operations aren't supported on the web, and if used will
// trigger a browser warning when the user attempts to navigate
// away.
if (!isWeb) {
e.veto(this.clearWorkspaceSessions(), 'positron.runtimeStartup.clearWorkspaceSessions');
}
}
}));
}
Expand Down

0 comments on commit 24e3c76

Please sign in to comment.