Microsoft/vscode

SCM - Shell integration ignores env overrides when opening from SCM panel?

Open

#160.765 geöffnet am 13. Sept. 2022

Auf GitHub ansehen
 (9 Kommentare) (0 Reaktionen) (1 zugewiesene Person)TypeScript (10.221 Forks)batch import
bughelp wantedscm

Repository-Metriken

Stars
 (74.848 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 11h 43m) (1.000 gemergte PRs in 30 T)

Beschreibung

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: 1.70.2
  • OS Version: Windows 10 21H1

Initial conditions

Set up a custom profile (globally):

    "terminal.integrated.profiles.windows": {
        "cmd14": {
            "path": "cmd",
            "overrideName": false,
            "env": {
                "PATH": "path\\to\\nodejs14npm7;${env:PATH}"
            }
        }
    },

Make this profile default (in workspace):

    "terminal.integrated.defaultProfile.windows": "cmd14",

Correct behavior

  1. Disable shell integration
  2. Open a terminal using Ctrl+~, execute node – it is found and executed
  3. Open a terminal from the context menu on a repository in the SCM panel, execute node – it is found and executed

Incorrect behavior

  1. Enable shell integration
  2. Open a terminal using Ctrl+~, execute node – it is found and executed
  3. Open a terminal from the context menu on a repository in the SCM panel, execute node – it is not found

In both cases here, Code reports that shell integration failed to activate. When printing PATH, I can see that the first terminal has it augmented, while the second one doesn't.

Contributor Guide