Skip to content

update-shape.py: check's and apply's NEXT lines print the root path unquoted where landing_failed's and the rollback hand-fix lines quote it with shlex, so a root under a path with a space pastes as a different command, and none of them quotes for cmd.exe or PowerShell #325

Closed

Description

@brettheap

Lane: openreposhape-3 (openRepoShape-3)

What happens. Measured on be2790e with a project root at <dir with a space>/Atlas:

update-shape.py check  --root "<dir with a space>/Atlas" --upstream <upstream> --at <sha>
NEXT  python3 update-shape.py apply --root <dir with a space>/Atlas --upstream <upstream> --at <sha> --yes ...

update-shape.py apply  --root "<dir with a space>/Atlas" ... --yes --branch shape/update-x
NEXT  git -C <dir with a space>/Atlas push -u origin shape/update-x && gh pr create --repo testorg/Atlas --base main --head shape/update-x

The root is one argument in the command that was run and two in the line printed for pasting. next_line's third form (no --branch) prints git -C {root} twice the same way. landing_failed (the failed-push and failed-PR NEXT, #227) quotes with shlex.join, and so do the rollback hand fixes (_by_hand), so one tool's NEXT lines quote the root two ways. The branch is not a concern: #227's checked_branch admits only [A-Za-z0-9._/@+-] after check-ref-format.

shlex.join is a POSIX shell's quoting. _by_hand's docstring says so and calls it deliberate ("Git Bash is one, cmd.exe and PowerShell are not"). shape-doctor.py has a platform-aware quote_arg (#101), which update-shape.py does not import by that file's own contract. Not measured: a Windows root.

Where. update-shape.py:cmd_check (:1477, --root {root} --upstream {upstream.label}), next_line (:2765, the forms at :2790 and :2811), against landing_failed (:2577) and _by_hand (:2086).

Why it matters. Every NEXT line is a line a person pastes into a shell; roots under My Projects or OneDrive - Org are ordinary on macOS and Windows. Direction: quote the root in the four builders that do not, then decide whether the Windows shells get their own quoter.

Source. PR #218, ## Left out, third bullet; PR #227, ## Left out, second bullet.

Activity

  1. brettheap commented on Oct 12, 2026

    @brettheap
    ContributorAuthor

    CLAIMED — lane openRepoShape-3, session b2cc9e59-4dc8-4f43-b01b-81cb99c8b07e@Eagle, 2026-10-12T10:59:15Z, for #325

    Logged in lanes/log/openRepoShape-3.md at d8cc49728a9b2d5b42f35b3fe31dc3720eaacc72.

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

    1. existing `CLAIMED —` comments on opensoft/openRepoShape#325:
       none
    2. `gh pr list --repo opensoft/openRepoShape --state all --search "#325"`, kept where the row or its body names `#325`:
       none
    3. `git ls-remote --heads git@github.com:opensoft/openRepoShape` branches naming `325` as a whole token:
       none
    
  2. added this to the v1.0.0 milestone on Oct 12, 2026
  3. added 4 commits that reference this issue on Oct 13, 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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions