Skip to content

Create New Integrated Terminal (Local) failed to launch: Path to shell executable "/usr/bin/zsh" does not exist. #246181

@hyrious

Description

@hyrious

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

  • VS Code Version: 1.99.1
  • OS Version: Darwin arm64 24.3.0

Steps to Reproduce:

  1. Setup a remote development environment that, it happens to have a shell having the same name as the host machine but in different path:

    Remote:
    Image

    Local:

    $ node -p 'os.userInfo().shell'
    /bin/zsh
  2. Run Terminal: Create New Integrated Terminal (Local) in VS Code remote mode from command palette.

  3. An error will thrown:

    Image

Fix:

// Try select an existing profile to fallback to, based on the default system shell, only do
// this when it is NOT a local terminal in a remote window where the front and back end OS
// differs (eg. Windows -> WSL, Mac -> Linux)
if (options.os === OS) {
let existingProfile = this._terminalProfileService.availableProfiles.find(e => path.parse(e.path).name === path.parse(executable).name);
if (existingProfile) {
if (options.allowAutomationShell) {

-if (options.os === OS) {
+if (options.os === OS && options.remoteAuthority) {

Metadata

Metadata

Labels

bugIssue identified by VS Code Team member as probable bughelp wantedIssues identified as good community contribution opportunitiesterminal-profiles

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions