Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't veto shutdown in web mode (2025.01 backport of https://github.com/posit-dev/positron/pull/6091) #6092

Merged
merged 3 commits into from
Jan 29, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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');
}
petetronic marked this conversation as resolved.
Show resolved Hide resolved
}
}));
}
Expand Down
Loading