Skip to content

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

@karrtikr

Description

@karrtikr

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions