Skip to content

Commit d961094

Browse files
Merge pull request #79 from iamkirkbater/yq-fixes
fixes yq for linux arm64
2 parents bbaa26c + a729421 commit d961094

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pkg/tools/yq/yq.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@ func (t *Tool) Install() error {
3636
}
3737

3838
matches := github.FindAssetsExcluding([]string{".tar.gz"}, github.FindAssetsForArchAndOS(release.Assets))
39+
if len(matches) == 2 {
40+
// yq provides both a linux-arm and linux-arm64 binary. This may apply to any other arch, so lets
41+
// just generally prefer a match on the 64 bit version if it is available, otherwise
42+
// we just pass through the failure
43+
matches = github.FindAssetsContaining([]string{"64"}, matches)
44+
}
3945
if len(matches) != 1 {
4046
return fmt.Errorf("unexpected number of assets found matching system spec: expected 1, got %d.\nMatching assets: %v", len(matches), matches)
4147
}

0 commit comments

Comments
 (0)