Skip to content

fix(shell): spawn shell via absolute path on macOS/Linux#42

Merged
DannyNs merged 1 commit into
developfrom
fix/macos-shell-spawn
Jun 18, 2026
Merged

fix(shell): spawn shell via absolute path on macOS/Linux#42
DannyNs merged 1 commit into
developfrom
fix/macos-shell-spawn

Conversation

@DannyNs

@DannyNs DannyNs commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator

resolveDefaultShell() returned a bare 'bash' when $SHELL was unset. Under a daemon/GUI launch (devglide start) the process env can lack PATH, so node-pty's posix_spawnp could not locate the bare command and failed with 'posix_spawnp failed' when creating a shell pane on macOS.

  • pickUnixShell(): resolve an absolute shell (/bin/zsh, /bin/bash, /bin/sh, ...), never a bare name. Mirrors the Windows branch.
  • withDefaultPath(): guarantee a sane PATH in the spawn env so commands run inside the shell even when the parent env has none.

Both extracted as pure helpers with unit coverage in shell-config.test.ts.

resolveDefaultShell() returned a bare 'bash' when $SHELL was unset.
Under a daemon/GUI launch (devglide start) the process env can lack
PATH, so node-pty's posix_spawnp could not locate the bare command and
failed with 'posix_spawnp failed' when creating a shell pane on macOS.

- pickUnixShell(): resolve an absolute shell (/bin/zsh, /bin/bash,
  /bin/sh, ...), never a bare name. Mirrors the Windows branch.
- withDefaultPath(): guarantee a sane PATH in the spawn env so commands
  run inside the shell even when the parent env has none.

Both extracted as pure helpers with unit coverage in shell-config.test.ts.
@DannyNs DannyNs merged commit f69bd2c into develop Jun 18, 2026
1 check passed
@DannyNs DannyNs deleted the fix/macos-shell-spawn branch June 18, 2026 10:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant