Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
hyrious opened this issue Apr 10, 2025 · 1 comment · May be fixed by #246682
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug help wanted Issues identified as good community contribution opportunities terminal-profiles

Comments

@hyrious
Copy link

hyrious commented Apr 10, 2025

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) {
@meganrogge meganrogge added bug Issue identified by VS Code Team member as probable bug terminal-profiles labels Apr 15, 2025
@meganrogge
Copy link
Contributor

@hyrious i'd accept a PR for this!

@meganrogge meganrogge added the help wanted Issues identified as good community contribution opportunities label Apr 15, 2025
hyrious added a commit to hyrious/vscode that referenced this issue Apr 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug help wanted Issues identified as good community contribution opportunities terminal-profiles
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants