Skip to content

Read the Managed Binaries in /usr/local/bin Under a Minimal PATH in install-tools.sh #2257

Closed

Description

@ptr727

What Happens

host-setup/linux/install-tools.sh reads the installed version of jq, uv, and git-restore-mtime by resolving them on PATH. Under a minimal PATH that leaves out /usr/local/bin, which is Debian's default for a cron job (/usr/bin:/bin), the managed copies there are not found. The report then calls uv and git-restore-mtime missing, reads jq as the distro's /usr/bin/jq, and adds a note claiming that the distro jq shadows the managed copy.

Why It Matters

The --json report from #1645 exists for a scheduled reporter, and a scheduled job is exactly where a minimal PATH is the default. A caller can prepend /usr/local/bin itself, but nothing tells it to, and the wrong answer reads as a confident one.

Reproduce

env -i PATH=/usr/bin:/bin host-setup/linux/install-tools.sh --report uv

On a host where uv is installed under /usr/local/bin, this reports it as missing.

Options

  1. Have the script add $BIN_DIR to its own PATH when absent, so the managed copies are read wherever the caller's PATH stops.
  2. Document the requirement for a scheduled caller and leave the script alone.

Activity

  1. added
    bugSomething isn't working
    scriptA defect in hub tooling
    on Oct 1, 2026
  2. ptr727 commented on Oct 8, 2026

    @ptr727
    OwnerAuthor

    Claimed for the wsl lane (#2478), worked on this WSL2 Debian host.

    • Branch: feature/wsl-2257
    • Predicted file set: host-setup/linux/install-tools.sh, tests/test_install_tools.py

    Any other group needing one of these files waits for this branch to merge.

  3. added a commit that references this issue on Oct 8, 2026
    318770a
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

    bugSomething isn't workingscriptA defect in hub tooling

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions