forked from DonJayamanne/pythonVSCode
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Open
Labels
area-terminalfeature-requestRequest for new features or functionalityRequest for new features or functionalityneeds PRReady to be worked onReady to be worked on
Description
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:
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
Metadata
Metadata
Assignees
Labels
area-terminalfeature-requestRequest for new features or functionalityRequest for new features or functionalityneeds PRReady to be worked onReady to be worked on