fix: install command ignores tool args; broken asset/tag templating#85
Open
omargallob wants to merge 1 commit into
Open
fix: install command ignores tool args; broken asset/tag templating#85omargallob wants to merge 1 commit into
omargallob wants to merge 1 commit into
Conversation
`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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.Assetpatterns containing{{.OS}}/{{.Arch}}(e.g. yq'syq_{{.OS}}_{{.Arch}}) were passed straight toeget --assetwithout template rendering, so the literal{{...}}string never matched a real release asset. AddedResolveAsset()(mirrors the existingResolveURL()) and wired it intobuildEgetRepoArgs."v" + Version, but jqlang/jq tags releases asjq-<version>, notv<version>. Added an optionalTagPrefixfield ontooldef.Toolto override the prefix per-tool, and set it for jq.Test plan
go build ./...succeedsgo test ./...passes (one pre-existing, network-flaky test (TestEnsureEget_NotFound_DownloadFails) fails identically onmain, unrelated to this change)devops-starter install jq --dry-runnow shows only jq, not all 80 toolsdevops-starter install notarealtool --dry-runprintswarning: unknown tool: notarealtooldevops-starter install jq yq -yinstalls successfully; verifiedjq --versionandyq --versionrun correctly afterward