Skip to content

remote-cli code command works in bash, but zsh or tmux #236401

Open
@samuela

Description

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:

  1. Ensure that terminal.integrated.inheritEnv is set to true (the default).
  2. Connect to remote machine via VSCode SSH.
  3. Open a bash terminal. Run code. Observe that it works.
  4. Open a zsh terminal. (Select from the dropdown menu on the "+" button.) Run code. Observe that it fails.
  5. 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Labels

bugIssue identified by VS Code Team member as probable bugremoteRemote system operations issuesterminal-processProblems launching processes, managing ptys, exiting, process leaks, etc.workbench-cliVS Code Command line issues

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions