Skip to content

Reject a bare PTY command string before allocation - #165

Merged
tony merged 2 commits into
masterfrom
fix/108-pty-argv
Dec 5, 2026
Merged

tony merged 2 commits into
masterfrom
fix/108-pty-argv

Conversation

@tony

@tony tony commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

Closes #108

What changed, and why:

open_pty() raises TypeError for a bare command string before allocating a PTY. Pass a sequence such as [executable] for a command with no arguments.

Checks run:

On Linux, Ruff formatting and lint, ty for Python 3.12 through 3.15, the full pytest suite with doctests, compiled Ghostty comparisons, and the Sphinx warnings-as-errors build passed.

Tool use:

Codex prepared the change and ran the local checks. A separate Codex reviewer replayed the changed behavior and checked the publication tree against the reviewed patch.

tony added a commit that referenced this pull request Dec 3, 2026
why: Readers need the behavior and scope of this change at release.

what:
- Add the unreleased entry for PR #165
- Preserve previously published notes and the parent branch's entries
@tony
tony marked this pull request as ready for review December 3, 2026 01:37
@tony
tony force-pushed the fix/108-pty-argv branch from 18302e5 to de6d1c4 Compare December 3, 2026 23:58
tony added 2 commits December 5, 2026 07:20
why: Indexing a command path as argv can select its first character.

what:
- Validate command strings before allocating PTY descriptors.
- Document the one-element argument form and test early rejection.

Fixes #108
why: A bare executable name is a string, which can be mistaken for a
     sequence of arguments.

what:
- Show the single-element command list and the early TypeError.
@tony
tony force-pushed the fix/108-pty-argv branch from de6d1c4 to a88aa64 Compare December 5, 2026 13:21
@tony
tony changed the base branch from master to fix/12-ghostty-parity-oracle December 5, 2026 13:21
@tony
tony changed the base branch from fix/12-ghostty-parity-oracle to master December 5, 2026 13:25
@tony
tony merged commit e12ce94 into master Dec 5, 2026
9 checks passed
@tony
tony deleted the fix/108-pty-argv branch December 5, 2026 20:41

This branch was successfully deployed

1 active deployment
docs — a88aa641 Deployed Dec 5, 2026 by tony via build (3.14) #384
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.

Passing a bare path to open_pty() attempts to execute /

1 participant