Skip to content

verify_binary.sh loses a relative binary path after changing into its temporary project #361

Description

@alpCaner

Found while reviewing

PR #352, feat/v06-batch at 1cab240df85d5896c5390697c069720ff2bb24d3.

python/scripts/verify_binary.sh documents a generic <path-to-binary> and names relative examples such as dist/tan/tan. It stores the argument verbatim, successfully runs checks 1 and 2, then cds into a temporary project before checks 3–5.

Reproduction

From python/, after a successful freeze:

sh scripts/verify_binary.sh ./dist/tan/tan /tmp/fresh-alp-sdk

Observed:

== 1/5 ./dist/tan/tan --version
... passes ...
== 2/5 generate --help carries --output
... passes ...
== 3/5 init writes the vendored template tree
scripts/verify_binary.sh: 96: ./dist/tan/tan: not found
FAIL: init exited non-zero

Running the same script with /absolute/path/to/dist/tan/tan passes all five checks.

CI happens to pass $PWD/..., so it cannot catch the documented relative invocation.

Acceptance criteria

  • Canonicalize BIN and SDK before changing directories, or invoke them from stable file descriptors/paths.
  • Cover both relative and absolute inputs.
  • Preserve POSIX sh portability, including macOS bash 3.2/Git Bash.

Related: #349, PR #352.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingciCI workflows, gates and test wiringpython-portRust-to-Python port of the tan command surface

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions