Skip to content

Naming a Tool Other Than the Last Makes install-tools.sh Exit 1 Silently #2256

Closed

Description

@ptr727

What Happens

host-setup/linux/install-tools.sh exits 1 with no output at all whenever the tools it is given leave out the last tool in its managed list. install-tools.sh uv jq and install-tools.sh --upgrade node jq (the second is one of the script's own --help examples) both stop silently before reading the host, on develop as it stands.

Why

resolve_selection ends with a nested loop whose last statement is a bare [[ $tool == "$requested" ]] && SELECTED+=("$tool"). On the final iteration, where the last managed tool was not requested, that test is false, so the function returns 1 and main stops under set -e. Naming the last tool, or naming no tool, passes, which is why a run with no arguments never shows it.

Reproduce

host-setup/linux/install-tools.sh git; echo "exit=$?"     # prints nothing, exit=1
host-setup/linux/install-tools.sh; echo "exit=$?"         # the full report, exit=0

Fix Shape

End the function with an explicit return 0, or use an if in the loop, and add a test that names a tool other than the last one.

Activity

  1. added
    bug
    script
    on Oct 1, 2026
  2. added a commit that references this issue on Oct 2, 2026
    c65c0cf
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

    bugscript

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions