-
Notifications
You must be signed in to change notification settings - Fork 30.3k
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
Add proposed API to specific workspace-specific environment variables via EnvironmentVariableCollection #179323
Conversation
src/vs/platform/terminal/common/environmentVariableCollection.ts
Outdated
Show resolved
Hide resolved
src/vs/workbench/contrib/terminal/browser/terminalProcessManager.ts
Outdated
Show resolved
Hide resolved
This comment was marked as resolved.
This comment was marked as resolved.
src/vs/platform/terminal/common/environmentVariableCollection.ts
Outdated
Show resolved
Hide resolved
src/vs/workbench/contrib/terminal/test/common/environmentVariableService.test.ts
Show resolved
Hide resolved
src/vs/workbench/contrib/terminal/browser/terminalProcessManager.ts
Outdated
Show resolved
Hide resolved
a9af6dd
to
1f3fdad
Compare
src/vs/workbench/contrib/terminal/electron-sandbox/localTerminalBackend.ts
Outdated
Show resolved
Hide resolved
@@ -600,6 +601,7 @@ export interface ITerminalProcessOptions { | |||
}; | |||
windowsEnableConpty: boolean; | |||
environmentVariableCollections: ISerializableEnvironmentVariableCollections | undefined; | |||
workspaceFolder: IWorkspaceFolder | undefined; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
workspaceFolder: IWorkspaceFolder | undefined; | |
workspaceFolder?: IWorkspaceFolder; |
then you can remove all of the environmentVariableCollections: undefined
from
vscode/src/vs/platform/terminal/test/node/terminalEnvironment.test.ts
Lines 13 to 16 in 0dc2f48
const enabledProcessOptions: ITerminalProcessOptions = { shellIntegration: { enabled: true, suggestEnabled: false }, windowsEnableConpty: true, environmentVariableCollections: undefined, workspaceFolder: undefined }; | |
const disabledProcessOptions: ITerminalProcessOptions = { shellIntegration: { enabled: false, suggestEnabled: false }, windowsEnableConpty: true, environmentVariableCollections: undefined, workspaceFolder: undefined }; | |
const winptyProcessOptions: ITerminalProcessOptions = { shellIntegration: { enabled: true, suggestEnabled: false }, windowsEnableConpty: false, environmentVariableCollections: undefined, workspaceFolder: undefined }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should not miss to pass workspaceFolder
when using ITerminalProcessOptions
, so I don't think making it optional for sake of tests is the best approach.
src/vs/workbench/contrib/terminal/test/common/environmentVariableService.test.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@meganrogge Thanks for the review! I've cleaned up the bits pointed out. Please have a look.
@@ -8,7 +8,8 @@ export const enum TerminalStorageKeys { | |||
SuggestedRendererType = 'terminal.integrated.suggestedRendererType', | |||
TabsListWidthHorizontal = 'tabs-list-width-horizontal', | |||
TabsListWidthVertical = 'tabs-list-width-vertical', | |||
EnvironmentVariableCollections = 'terminal.integrated.environmentVariableCollections', | |||
DeprecatedEnvironmentVariableCollections = 'terminal.integrated.environmentVariableCollections', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note older storage for env collection is deprecated now and will be cleared.
@karrtikr some test failures but o/w LGTM |
This reverts commit 9e4fa31.
Reverting fix for remote terminals which is leading to smoke tests timing out, will be tackled separately. |
For #171173