mirror of
https://github.com/coder/code-server.git
synced 2024-12-25 18:52:34 +03:00
fix: update import in channel.ts getSystemShell
This commit is contained in:
parent
b71c5061e1
commit
0f18d1fddc
@ -30,7 +30,7 @@ import * as terminal from 'vs/workbench/contrib/terminal/common/remoteTerminalCh
|
|||||||
import { IShellLaunchConfig, ITerminalEnvironment, ITerminalLaunchError } from 'vs/workbench/contrib/terminal/common/terminal';
|
import { IShellLaunchConfig, ITerminalEnvironment, ITerminalLaunchError } from 'vs/workbench/contrib/terminal/common/terminal';
|
||||||
import { TerminalDataBufferer } from 'vs/workbench/contrib/terminal/common/terminalDataBuffering';
|
import { TerminalDataBufferer } from 'vs/workbench/contrib/terminal/common/terminalDataBuffering';
|
||||||
import * as terminalEnvironment from 'vs/workbench/contrib/terminal/common/terminalEnvironment';
|
import * as terminalEnvironment from 'vs/workbench/contrib/terminal/common/terminalEnvironment';
|
||||||
import { getSystemShell } from 'vs/workbench/contrib/terminal/node/terminal';
|
import { getSystemShell } from 'vs/base/node/shell';
|
||||||
import { getMainProcessParentEnv } from 'vs/workbench/contrib/terminal/node/terminalEnvironment';
|
import { getMainProcessParentEnv } from 'vs/workbench/contrib/terminal/node/terminalEnvironment';
|
||||||
import { TerminalProcess } from 'vs/workbench/contrib/terminal/node/terminalProcess';
|
import { TerminalProcess } from 'vs/workbench/contrib/terminal/node/terminalProcess';
|
||||||
import { AbstractVariableResolverService } from 'vs/workbench/services/configurationResolver/common/variableResolver';
|
import { AbstractVariableResolverService } from 'vs/workbench/services/configurationResolver/common/variableResolver';
|
||||||
@ -263,6 +263,7 @@ export class ExtensionEnvironmentChannel implements IServerChannel {
|
|||||||
workspaceStorageHome: this.environment.workspaceStorageHome,
|
workspaceStorageHome: this.environment.workspaceStorageHome,
|
||||||
userHome: this.environment.userHome,
|
userHome: this.environment.userHome,
|
||||||
os: platform.OS,
|
os: platform.OS,
|
||||||
|
marks: []
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -681,7 +682,7 @@ export class TerminalProviderChannel implements IServerChannel<RemoteAgentConnec
|
|||||||
const resolverService = new VariableResolverService(remoteAuthority, args, process.env as platform.IProcessEnvironment);
|
const resolverService = new VariableResolverService(remoteAuthority, args, process.env as platform.IProcessEnvironment);
|
||||||
const resolver = terminalEnvironment.createVariableResolver(activeWorkspace, resolverService);
|
const resolver = terminalEnvironment.createVariableResolver(activeWorkspace, resolverService);
|
||||||
|
|
||||||
const getDefaultShellAndArgs = (): { executable: string; args: string[] | string } => {
|
const getDefaultShellAndArgs = async (): Promise<{ executable: string; args: string[] | string }> => {
|
||||||
if (shellLaunchConfig.executable) {
|
if (shellLaunchConfig.executable) {
|
||||||
const executable = resolverService.resolve(activeWorkspace, shellLaunchConfig.executable);
|
const executable = resolverService.resolve(activeWorkspace, shellLaunchConfig.executable);
|
||||||
let resolvedArgs: string[] | string = [];
|
let resolvedArgs: string[] | string = [];
|
||||||
@ -698,7 +699,7 @@ export class TerminalProviderChannel implements IServerChannel<RemoteAgentConnec
|
|||||||
const executable = terminalEnvironment.getDefaultShell(
|
const executable = terminalEnvironment.getDefaultShell(
|
||||||
(key) => args.configuration[key],
|
(key) => args.configuration[key],
|
||||||
args.isWorkspaceShellAllowed,
|
args.isWorkspaceShellAllowed,
|
||||||
getSystemShell(platform.platform),
|
await getSystemShell(platform.platform),
|
||||||
process.env.hasOwnProperty('PROCESSOR_ARCHITEW6432'),
|
process.env.hasOwnProperty('PROCESSOR_ARCHITEW6432'),
|
||||||
process.env.windir,
|
process.env.windir,
|
||||||
resolver,
|
resolver,
|
||||||
|
Loading…
Reference in New Issue
Block a user