Skip to content

The openRepoTools entry point prints a traceback, not its refusal, when the only bash on PATH cannot be run #256

Open

Description

@brettheap

Found by the independent review of #228's pull request 1 (NIT-2). The code arrives with that pull request.

  • Where: src/openrepotools/cli.py:81, at Releases: annotated tags, release/vX.Y branches, and openrepotools on TestPyPI and PyPI from v1.1.0 #228's PR 1 head c1c1c71. main() catches only FileNotFoundError and NotADirectoryError around os.execvp("bash", …).
  • The failure:
    • There is no runnable bash, but PATH holds a mode-644 file named bash, or a directory that cannot be searched.
    • os.execvp keeps that EACCES and raises PermissionError.
    • The person gets a traceback and exit 1. They should get the refusal contracts/cli-output.md gives for a missing bash, with exit 2.
  • A runnable bash later on PATH is unaffected, because execvp goes on to it.
  • How it was shown: a run. env -i PATH=<dir with a mode-644 bash> python3 -c 'from openrepotools.cli import main; …' gave PermissionError: [Errno 13] and exit 1.
  • Why it waits: the contract names only "no bash" and "PATH ending in a file", so this edge case is outside it.
  • The fix: give PermissionError the same refusal, naming the unrunnable bash. Add a test beside test_entry_'s no-bash cases.

Filed in milestone v1.2.0 on Brett Heap's word (2026-10-18T20:2xZ, "yes, file both as you recommend"). It is unclaimed.

Lane: openRepoTools-3

Activity

  1. added this to the v1.2.0 milestone on Oct 18, 2026
  2. brettheap commented on Oct 20, 2026

    @brettheap
    ContributorAuthor

    CLAIMED — lane openRepoTools-5, session 0d83dca2-c18c-4bb0-99ce-896e6cafea02@Eagle, 2026-10-20T23:00:33Z, for #256

    Logged in lanes/log/openRepoTools-5.md at 95043c2aa9b0b02ac876ba7acc0ca2706edbab4c.

    The three reads (lane-collision-protocol Rule 1):

    1. existing `CLAIMED —` comments on opensoft/openRepoTools#256:
       none
    2. `gh pr list --repo opensoft/openRepoTools --state all --search "#256"`, kept where the row or its body names `#256`:
    262	openRepoTools becomes the openrepotools package: pipx installs the wheel with the whole payload, --install leaves pipx's link to pipx, --version names the release, and every count line says where the other commands come from (#228, PR 1 of 4)	006-release-pypi	MERGED
    3. `git ls-remote --heads git@github.com:opensoft/openRepoTools` branches naming `256` as a whole token:
       none
    
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions