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

Fix remote.autoForwardPortsSource sometimes not respected from machine settings #184860

Merged
merged 1 commit into from Jun 12, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/vs/workbench/contrib/remote/browser/remoteExplorer.ts
Expand Up @@ -31,6 +31,7 @@ import { IExternalUriOpenerService } from 'vs/workbench/contrib/externalUriOpene
import { IHostService } from 'vs/workbench/services/host/browser/host';
import { IConfigurationRegistry, Extensions as ConfigurationExtensions } from 'vs/platform/configuration/common/configurationRegistry';
import { ILogService } from 'vs/platform/log/common/log';
import { IWorkbenchConfigurationService } from 'vs/workbench/services/configuration/common/configuration';

export const VIEWLET_ID = 'workbench.view.remote';

Expand Down Expand Up @@ -181,7 +182,7 @@ export class AutomaticPortForwarding extends Disposable implements IWorkbenchCon
@IRemoteExplorerService remoteExplorerService: IRemoteExplorerService,
@IWorkbenchEnvironmentService environmentService: IWorkbenchEnvironmentService,
@IContextKeyService contextKeyService: IContextKeyService,
@IConfigurationService configurationService: IConfigurationService,
@IWorkbenchConfigurationService configurationService: IWorkbenchConfigurationService,
@IDebugService debugService: IDebugService,
@IRemoteAgentService remoteAgentService: IRemoteAgentService,
@ITunnelService tunnelService: ITunnelService,
Expand All @@ -193,7 +194,7 @@ export class AutomaticPortForwarding extends Disposable implements IWorkbenchCon
return;
}

remoteAgentService.getEnvironment().then(environment => {
configurationService.whenRemoteConfigurationLoaded().then(() => remoteAgentService.getEnvironment()).then(environment => {
if (environment?.os !== OperatingSystem.Linux) {
Registry.as<IConfigurationRegistry>(ConfigurationExtensions.Configuration)
.registerDefaultConfigurations([{ overrides: { 'remote.autoForwardPortsSource': PORT_AUTO_SOURCE_SETTING_OUTPUT } }]);
Expand Down