Skip to content
Source
Sign inSign up
pingdotgg/t3code

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

ClosedStiensWout(GitHub profile, opens in a new tab) opened this issue 0 comments

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 @ 015eba4083974f8ed86694a8770a4311d8a4714b, and confirmed while preparing the fix against b1050d344962e1adfbe3309f880ae13c0fa98aad.

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.

  1. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted

  2. juliusmarminge closed this

Sign in to join this conversation.