Skip to content

fix: install command ignores tool args; broken asset/tag templating#85

Open
omargallob wants to merge 1 commit into
mainfrom
fix/install-tool-filter-and-asset-templating
Open

fix: install command ignores tool args; broken asset/tag templating#85
omargallob wants to merge 1 commit into
mainfrom
fix/install-tool-filter-and-asset-templating

Conversation

@omargallob

Copy link
Copy Markdown
Owner

Summary

  • devops-starter install <tool> ignored its positional tool-name argument and installed every registered tool instead of just the one(s) named — only --only <group> was applied.
  • Asset patterns containing {{.OS}}/{{.Arch}} (e.g. yq's yq_{{.OS}}_{{.Arch}}) were passed straight to eget --asset without template rendering, so the literal {{...}} string never matched a real release asset. Added ResolveAsset() (mirrors the existing ResolveURL()) and wired it into buildEgetRepoArgs.
  • Release tags were hardcoded as "v" + Version, but jqlang/jq tags releases as jq-<version>, not v<version>. Added an optional TagPrefix field on tooldef.Tool to override the prefix per-tool, and set it for jq.

Test plan

  • go build ./... succeeds
  • go test ./... passes (one pre-existing, network-flaky test (TestEnsureEget_NotFound_DownloadFails) fails identically on main, unrelated to this change)
  • devops-starter install jq --dry-run now shows only jq, not all 80 tools
  • devops-starter install notarealtool --dry-run prints warning: unknown tool: notarealtool
  • devops-starter install jq yq -y installs successfully; verified jq --version and yq --version run correctly afterward

`devops-starter install <tool>` silently installed every registered tool
instead of just the named one, since runInstall never read its positional
args. This also masked two installer bugs surfaced while debugging jq/yq:

- Asset glob patterns like "yq_{{.OS}}_{{.Arch}}" were passed to eget
  literally instead of being template-rendered, so any tool using OS/Arch
  placeholders in Asset failed to match a release asset.
- Release tags were hardcoded as "v<version>", but jqlang/jq tags releases
  as "jq-<version>". Added an optional TagPrefix field to override this
  per-tool.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant