Skip to content

fix(tools): make check-tools compatible with bash 3.x#61

Merged
dims merged 1 commit intoNVIDIA:mainfrom
yuanchen8911:fix/bash3-compatibility
Feb 5, 2026
Merged

fix(tools): make check-tools compatible with bash 3.x#61
dims merged 1 commit intoNVIDIA:mainfrom
yuanchen8911:fix/bash3-compatibility

Conversation

@yuanchen8911
Copy link
Contributor

@yuanchen8911 yuanchen8911 commented Feb 5, 2026

Summary

tools-check requires bash 4.0+ and doesn't work with bash 3.*.

  • Replace declare -A associative array with a case-based get_tool_metadata() function
  • Associative arrays require bash 4.0+, but macOS ships with bash 3.2 by default
  • Ensures the script works across all environments without requiring contributors to install a newer bash

Test plan

  • Verified make tools-check works on macOS with bash 3.2.57
 make tools-check
=== Tool Version Check ===

Tool                 Expected        Installed       Status
----                 --------        ---------       ------
go                   1.25            1.25            ✓
goreleaser           v2              2.13.3          ✓
ko                   v0.18.0         0.18.0          ✓
crane                v0.20.6         0.20.6          ✓
git-cliff            2.12.0          2.12.0          ✓
golangci-lint        v2.6.2          2.5.0           ✓
yamllint             1.35.0          1.35.1          ✓
addlicense           v1.1.1          -               ✗
go-licenses          v1.6.0          -               ✗
grype                v0.107.0        0.107.0         ✓
kubectl              v1.32           v1.32           ✓
kind                 0.31.0          0.31.0          ✓
ctlptl               0.8.43          0.9.0           ⚠
tilt                 0.35.0          0.36.3          ⚠
helm                 v4.1.0          v4.1.0          ✓
docker               -               27.3.1          ✓

Legend: ✓ = installed, ⚠ = version mismatch or warning, ✗ = missing

Replace associative array (declare -A) with a case-based
get_tool_metadata() function. Associative arrays require
bash 4.0+, but macOS ships with bash 3.2 by default.

This ensures the script works across all environments without
requiring contributors to install a newer bash version.
@yuanchen8911 yuanchen8911 requested a review from a team as a code owner February 5, 2026 02:30
@yuanchen8911 yuanchen8911 requested review from dims and mchmarny February 5, 2026 02:31
@github-actions
Copy link

github-actions bot commented Feb 5, 2026

Coverage Report ✅

Metric Value
Coverage 73.3%
Threshold 70%
Status Pass
Coverage Badge
![Coverage](https://img.shields.io/badge/coverage-73.3%25-green)

No Go source files changed in this PR.

@dims dims merged commit 8e8bf85 into NVIDIA:main Feb 5, 2026
6 checks passed
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.

2 participants