Skip to content

[Bug]: terminals exit when SHELL has a space before a dash directory #37068

Closed

Description

@StiensWout

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/server

Steps to reproduce

  1. On Linux, create an executable symlink to /bin/bash at an absolute path ending in Jane -Doe/bash.
  2. Set SHELL to that unquoted path and open a terminal through TerminalManager.open using the native PTY adapter.
  3. The same failure occurs with directory names Jane -Doe=Smith and Jane -Doe Smith.

Expected behavior

The terminal launches the configured shell using the complete executable path.

Actual behavior

The manager truncates the executable at the whitespace before the dash. The native PTY reports execvp(3) failed.: No such file or directory and exits with code 1. The terminal does not recover through the fallback list in this reproduction.

Impact

Minor bug or occasional failure. Deterministic for affected paths; prevalence is unmeasured.

Version or commit

Reproduced on pingdotgg/main @ 015eba4, and confirmed while preparing the fix against b1050d3.

Environment

Linux, Node.js, server terminal manager with native PTY. Web, desktop and mobile share this server behavior. No native macOS or Windows reproduction claimed.

Logs or stack traces

SHELL="/<fixture>/Jane -Doe/bash"
open: status=running pid=true
outcome: exited 1
output: "execvp(3) failed.: No such file or directory"
RESULT: configured shell NOT launched

Screenshots, recordings, or supporting files

Found by the terminal-shell-launch bughunt and independently confirmed by Claude Opus 5.5 on current main. The fix includes a focused public TerminalManager.open regression test and was checked with a real Manager + native PTY runtime transcript.

Workaround

Use a shell path without a whitespace-followed dash directory component, or quote the configured path.

Activity

  1. added
    vouch:trusted
    on Nov 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    vouch:trusted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions