Portable mode improvements and bug fixes (#287063)

Disabled protocol handlers and registry updates on Windows in portable mode.
Added API proposal to detect if VS Code is running in portable mode from extensions.
Skipped protocol redirect in GitHub authentication in portable mode.
This commit is contained in:
Dmitriy Vasyura
2026-01-24 04:22:53 -08:00
committed by GitHub
parent 141d5452e8
commit aa19df565f
25 changed files with 156 additions and 26 deletions

View File

@@ -46,7 +46,12 @@
if (error) {
document.querySelector('.error-message > .detail').textContent = error;
document.querySelector('body').classList.add('error');
} else if (redirectUri) {
} else if (!redirectUri) {
// Portable mode: authentication succeeded, no redirect needed
document.querySelector('.title').textContent = appName;
document.querySelector('.success-message > .subtitle').textContent = 'You have successfully signed in.';
document.querySelector('.success-message > .detail').textContent = 'You can now close this window.';
} else {
// Wrap the redirect URI so that the browser remembers who triggered the redirect
const wrappedRedirectUri = `https://vscode.dev/redirect?url=${encodeURIComponent(redirectUri)}`;
// Set up the fallback link