-
Notifications
You must be signed in to change notification settings - Fork 38.6k
Closed
Labels
bugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bugimportantIssue identified as high-priorityIssue identified as high-priorityinsiders-releasedPatch has been released in VS Code InsidersPatch has been released in VS Code Insidersterminal-shell-integrationShell integration infrastructure, command decorations, etc.Shell integration infrastructure, command decorations, etc.verification-neededVerification of issue is requestedVerification of issue is requestedverifiedVerification succeededVerification succeeded
Milestone
Description
Testing #241722
Have a snippet like this and notice how the first listener influences what the second sees. The event and object should be protected from unwanted modifications, like use Object.freeze and JS getter functions
vscode.window.onDidChangeTerminalShellIntegration(e => {
// console.log(e.shellIntegration.env);
if (!e.shellIntegration.env || !e.shellIntegration.env.value) {
console.log('no shell env')
return
}
console.log(`ENV: isTrusted?${e.shellIntegration.env.isTrusted}`);
e.shellIntegration.env.isTrusted = true
console.log(`ENV: isTrusted?${e.shellIntegration.env.isTrusted}`);
});
// second listener
vscode.window.onDidChangeTerminalShellIntegration(e => {
if (!e.shellIntegration.env || !e.shellIntegration.env.value) {
return
}
console.log(`ENV: isTrusted2?${e.shellIntegration.env.isTrusted}`);
});
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bugimportantIssue identified as high-priorityIssue identified as high-priorityinsiders-releasedPatch has been released in VS Code InsidersPatch has been released in VS Code Insidersterminal-shell-integrationShell integration infrastructure, command decorations, etc.Shell integration infrastructure, command decorations, etc.verification-neededVerification of issue is requestedVerification of issue is requestedverifiedVerification succeededVerification succeeded