-
Notifications
You must be signed in to change notification settings - Fork 35.7k
Add Python activate hooks into shell integration scripts #261094
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
Merged
Merged
+74
−2
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
anthonykim1
commented
Aug 11, 2025
src/vs/platform/terminal/common/environmentVariableCollection.ts
Outdated
Show resolved
Hide resolved
anthonykim1
commented
Aug 11, 2025
anthonykim1
commented
Aug 11, 2025
src/vs/workbench/contrib/terminal/common/scripts/shellIntegration-bash.sh
Outdated
Show resolved
Hide resolved
anthonykim1
commented
Aug 11, 2025
anthonykim1
commented
Aug 12, 2025
src/vs/platform/terminal/common/environmentVariableCollection.ts
Outdated
Show resolved
Hide resolved
|
After this PR, will make an additional PR in env extension to make sure they have fallback to still activate in case env extension can't locate hooks from vscode shell integration scripts. |
Tyriar
requested changes
Aug 12, 2025
src/vs/platform/terminal/common/environmentVariableCollection.ts
Outdated
Show resolved
Hide resolved
src/vs/platform/terminal/common/environmentVariableCollection.ts
Outdated
Show resolved
Hide resolved
src/vs/workbench/contrib/terminal/common/environmentVariableService.ts
Outdated
Show resolved
Hide resolved
src/vs/workbench/contrib/terminal/common/scripts/shellIntegration-bash.sh
Outdated
Show resolved
Hide resolved
src/vs/workbench/contrib/terminal/common/scripts/shellIntegration.ps1
Outdated
Show resolved
Hide resolved
src/vs/workbench/contrib/terminal/test/common/environmentVariableCollection.test.ts
Outdated
Show resolved
Hide resolved
Tyriar
requested changes
Aug 13, 2025
Tyriar
requested changes
Aug 13, 2025
Tyriar
previously approved these changes
Aug 13, 2025
Tyriar
approved these changes
Aug 13, 2025
anthonykim1
added a commit
to microsoft/vscode-python-environments
that referenced
this pull request
Aug 15, 2025
Issue related: microsoft/vscode#259637 Adapting to: microsoft/vscode#261094 FYI if activation fails when eval from shell integration scripts, we're making it very obvious for them: microsoft/vscode#261094 (comment) TODO: Remove activation debris in shell init files for existing users. /cc @cwebster-99
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.

Resolves: #259637
Important things to note:
---> Findings: Try catch was not available for zsh, bash so using negate to prevent crash. Fish doesn't crash on eval
---> Try catch was available in pwsh
---> Done
*icon similar to terminal restored message. ---> Done