mirror of
https://github.com/microsoft/vscode.git
synced 2026-07-10 00:35:30 +01:00
Fix fetching remote backends for attach session command
Part of #136064
This commit is contained in:
@@ -970,11 +970,13 @@ export function registerTerminalActions() {
|
||||
const labelService = accessor.get(ILabelService);
|
||||
const remoteAgentService = accessor.get(IRemoteAgentService);
|
||||
const notificationService = accessor.get(INotificationService);
|
||||
const backend = accessor.get(ITerminalInstanceService).getBackend();
|
||||
const terminalGroupService = accessor.get(ITerminalGroupService);
|
||||
|
||||
const remoteAuthority = remoteAgentService.getConnection()?.remoteAuthority ?? undefined;
|
||||
const backend = accessor.get(ITerminalInstanceService).getBackend(remoteAuthority);
|
||||
|
||||
if (!backend) {
|
||||
throw new Error(`No backend registered for remote authority '${remoteAgentService.getConnection()?.remoteAuthority ?? undefined}'`);
|
||||
throw new Error(`No backend registered for remote authority '${remoteAuthority}'`);
|
||||
}
|
||||
|
||||
const terms = await backend.listProcesses();
|
||||
|
||||
Reference in New Issue
Block a user