Skip to content
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

If automatic shell integration is failing to activate environment, recommend users to do manual installation #23113

Open
Tracked by #22879
karrtikr opened this issue Mar 22, 2024 · 0 comments
Labels
area-terminal feature-request Request for new features or functionality needs PR Ready to be worked on

Comments

@karrtikr
Copy link

karrtikr commented Mar 22, 2024

In a lot of cases with remote scenario or complex shell setups, automatic shell integration fails silently, due to which environment variable written by us in terminal gets overwritten by the shell integration script, leading to issues with failed activation. This is due to a limitation on VS Code's end:

image

Manual installation solves the problem in those cases, which requires users to edit their shell initialization scripts.

Once microsoft/vscode#145234 is done, we can now detect whether automatic shell integration is failing or not:

  • Launch a hidden terminal and run:
python -c"import sys;print(sys.executable)
  • Check whether it's the same as selected environment

If it is not, we can show a notification to users suggesting manual installation. We can either:

  • Ask them to do it themselves, which from my experience with such issues, every user is able to do easily
  • Guide them to do it, we already have an implementation for it where we asked users to install deactivate command in their init script (link):
    • Open corresponding shell initialization script on their behalf
    • Suggest the edit they need to make enclosed by markers
@karrtikr karrtikr added the feature-request Request for new features or functionality label Mar 22, 2024
@karrtikr karrtikr self-assigned this Mar 22, 2024
@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Mar 22, 2024
@karrtikr karrtikr added area-terminal needs PR Ready to be worked on and removed triage-needed Needs assignment to the proper sub-team labels Mar 22, 2024
@karrtikr karrtikr removed their assignment Mar 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-terminal feature-request Request for new features or functionality needs PR Ready to be worked on
Projects
None yet
Development

No branches or pull requests

1 participant