Skip to content

Commit c5aa6c1

Browse files
committed
Throw when invalid options are used
1 parent cd5fe46 commit c5aa6c1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/vs/workbench/api/common/extHostTerminalService.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -927,6 +927,9 @@ class EnvironmentVariableCollection {
927927
}
928928

929929
private _setIfDiffers(variable: string, mutator: vscode.EnvironmentVariableMutator & { scope: vscode.EnvironmentVariableScope | undefined }): void {
930+
if (mutator.options && mutator.options.applyAtProcessCreation === false && mutator.options.applyAtShellIntegration) {
931+
throw new Error('EnvironmentVariableMutatorOptions must apply at either process creation or shell integration');
932+
}
930933
if (!mutator.scope) {
931934
delete (mutator as any).scope; // Convenient for tests
932935
}

0 commit comments

Comments
 (0)