remote-cli code
command works in bash, but zsh or tmux #236401
Open
Description
opened on Sep 2, 2022
Version: 1.71.0 (Universal)
Commit: 784b017
Date: 2022-09-01T07:25:38.437Z
Electron: 19.0.12
Chromium: 102.0.5005.167
Node.js: 16.14.2
V8: 10.2.154.15-electron.0
OS: Darwin arm64 21.6.0
Sandboxed: No
- VSCode Version: 1.71.0 (Universal)
- Local OS Version: Darwin arm64 21.6.0
- Remote OS Version:
- Remote Extension/Connection Type: SSH
- Logs: n/a
Steps to Reproduce:
- Ensure that
terminal.integrated.inheritEnv
is set to true (the default). - Connect to remote machine via VSCode SSH.
- Open a bash terminal. Run
code
. Observe that it works. - Open a zsh terminal. (Select from the dropdown menu on the "+" button.) Run
code
. Observe that it fails. - Try the same for tmux. Observe that it fails as well.
Does this issue occur when you try this locally?: No
Does this issue occur when you try this locally and all extensions are disabled?: Yes
It appears as though PATH is propagating correctly for bash, but not the other two:
# bash
my-machine:~$ echo $PATH
/home/sam.ainsworth/.nix-profile/bin:/nix/var/nix/profiles/default/bin:/home/sam.ainsworth/.vscode-server/bin/784b0177c56c607789f9638da7b6bf3230d47a8c/bin/remote-cli:/home/sam.ainsworth/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/usr/local/go/bin
# zsh
❯ echo $PATH
/home/sam.ainsworth/.nix-profile/bin:/nix/var/nix/profiles/default/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/usr/local/go/bin
# tmux
sam.ainsworth@cs-satze7x4cv-gpu-1662050665:~$ echo $PATH
/home/sam.ainsworth/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/usr/local/go/bin
Opening a bash terminal and then running zsh from within that terminal works.
Why is VSCode propagating different environment variables to different shells?
Potentially related: microsoft/vscode-remote-release#4460
Activity