Skip to content

--install refuses a $OPENREPOTOOLS_BIN_DIR holding a colon, a control character or a misdrawn character before it places or prints anything, and --version checks $OPENREPOTOOLS_REPO and $OPENREPOTOOLS_REF first (mirroring openRepoShape #760, #837 and #866) #241

Open

Description

@brettheap

Goal: openRepoTools --install refuses a $OPENREPOTOOLS_BIN_DIR that no $PATH line can name, or that a terminal would draw as something else, as openRepoShape's install.sh and openRepoShape --install now do.

  • It refuses before it places a file, fetches anything, or prints a line that names the directory.
  • --version, and every refusal that prints $OPENREPOTOOLS_REPO or $OPENREPOTOOLS_REF, check those two values once, up front.

Where this comes from. Lane openRepoTools-3 filed it on Brett Heap's word, verbatim: "yes, file it in v1.2.0" (2026-10-18).

What openRepoShape did

  • #760 (PR #804, landed as 2e476a7): install.sh and openRepoShape --install refuse a $OPENREPOSHAPE_BIN_DIR that holds:

    • a : or a newline;
    • a C0 control or DEL;
    • a C1 control (U+0080 to U+009F, matched by its two UTF-8 bytes).

    They refuse before any request, and without echoing the value.

  • #837 (PR #841, landed as ca47b71): the same check, widened by misdrawn_characters to characters a terminal draws as something other than themselves: bidi overrides, U+200B, U+2028 and U+FEFF.

  • Still open there, and worth reading before the fix:

    • #858: the C1 check matches bytes, so a GBK or GB18030 name can be refused, and a lone 0x9B is placed.
    • #866: --version and two fetch refusals print $OPENREPOSHAPE_REPO and $OPENREPOSHAPE_REF unchecked.

Where openRepoTools stands (main f595e44)

  • How the directory is read. $OPENREPOTOOLS_BIN_DIR is read as ${OPENREPOTOOLS_BIN_DIR:-$HOME/.local/bin} at openRepoTools:1429, :1607, :1840, :2433 and :4238.
  • The only character check is the receipt's. A destination that holds a tab or a newline gets no receipt (receipt_tsv_unsafe, used by receipt_add at :1290-1301). The commands are still placed, and the path is still printed.
  • The PATH note prints the directory as typed (:1943-1944): "$dir is not on $PATH. Add it:", then "export PATH="$dir:$PATH"". A : in the directory makes that line name two directories, and a CR or an ESC reaches the terminal.
  • --version prints both values as typed. It prints openRepoTools ($REPO @ $REF) (:4317).
    • $OPENREPOTOOLS_REPO is checked by is_slug only on the fetch path (:738).
    • Lane 3 found no check of $OPENREPOTOOLS_REF before it goes into the API and raw URLs (:267, :273, :656, :666).

Lands after #228. Feature 006 changes --version and adds the package route, so write this against main once #228's PRs have landed.

Lines

  • Refuse a $OPENREPOTOOLS_BIN_DIR that holds any of these, before the first placement, fetch or line that names it:

    • a : or a newline;
    • any other C0 control, or DEL;
    • a C1 control;
    • a misdrawn character.

    The refusal says which kind of character it found, and never echoes the value.

  • Decide #858's two cases for our check: a GBK or GB18030 name, and a lone 0x9B. Alternatively, name them as known limits in the refusal's words.

  • Check $OPENREPOTOOLS_REPO and $OPENREPOTOOLS_REF once, with the same character rule, before --version answers and before any fetch. --version prints neither value unchecked.

  • Add hermetic tests in a sandbox HOME, one per character class, for each of the three values.

  • README's install paragraph names the refusal.

Not in scope:

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:00Z, for #241

    Logged in lanes/log/openRepoTools-5.md at f2a04ce2395557411f4289cba20e6354c6dd7fef.

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

    1. existing `CLAIMED —` comments on opensoft/openRepoTools#241:
       none
    2. `gh pr list --repo opensoft/openRepoTools --state all --search "#241"`, kept where the row or its body names `#241`:
       none
    3. `git ls-remote --heads [email protected]:opensoft/openRepoTools` branches naming `241` as a whole token:
       none
    
  3. added 6 commits that reference this issue on Oct 21, 2026
  4. modified the milestones: v1.2.0, v1.2.1 on Nov 8, 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

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions