Skip to content

run-pre-tag: shell=True dispatches via cmd.exe on Windows, so declared rows cannot portably reference $PY #602

Description

@SUaDtL

Found during the #585/#584/#583 remediation (PR #601), measured, not hypothesized.

run-pre-tag executes declared row commands with subprocess.run(command, shell=True). On Windows that always dispatches via cmd.exe, which performs no $VAR expansion. PR #601 exports PY (the running interpreter) into every declared command's environment, so a POSIX-hosted row can now spell "$PY" — but a Windows-hosted row spelling "$PY" gets the literal token, fails with exit 1 (outside the could-not-run set {126, 127, 9009}), and lands in exit 5 "drift" — the exact misdiagnosis the exit-code split was built to close.

Consequence: Part 3 of the remediation (rewriting this repo's own release-targets.md rows from hardcoded python3 to "$PY") is deferred; the rows keep python3 for now, and the skill prose states the platform boundary explicitly.

Fix direction: give run-pre-tag a deterministic POSIX dispatch on Windows (e.g. resolve bash and pass executable=, or dispatch via sh -c when available, with a documented fallback), so a declared row has ONE portable spelling. Then complete the row rewrite and drop the platform caveat from the skill prose. Note %PY% is not an answer: rows are committed per-project and shared across every contributor's platform.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingsev:medTribunal/triage: medium severity

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions