From 66c6fd0ace0fca2d27a7702c53b79edc3f978c39 Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Sun, 15 Feb 2026 16:03:18 +0100 Subject: [PATCH] Fix tc-lint glob handling for charts without `ci/*values.yaml` (#45013) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Lint runs were emitting `ls: cannot access '.../ci/*values.yaml'` for charts that do not define CI override files (e.g. `charts/stable/friendica`). The issue came from using `ls` as a glob existence check in `tc-lint.sh`. - **Root cause** - `helm_lint()` used `ls $chart_path/ci/*values.yaml` inside a conditional; when the glob had no matches, `ls` printed an error. - **Change** - Replaced the `ls`-based check with a silent glob match check using `compgen -G`. - Scope is limited to `.github/scripts/tc-lint.sh` and preserves existing lint decision logic. - **Behavioral impact** - Charts without `ci/*values.yaml` no longer produce noisy shell errors during lint. - Existing lint pass/fail behavior remains unchanged. ```bash # before if [[ ! $(ls $chart_path/ci/*values.yaml) ]]; then # after if ! compgen -G "$chart_path/ci/*values.yaml" >/dev/null; then ``` --- 💬 We'd love your input! Share your thoughts on Copilot coding agent in our [2 minute survey](https://gh.io/copilot-coding-agent-survey). --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: PrivatePuffin <7613738+PrivatePuffin@users.noreply.github.com> --- .github/scripts/tc-lint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/scripts/tc-lint.sh b/.github/scripts/tc-lint.sh index 5a9a60ebb46..da4087edc5b 100755 --- a/.github/scripts/tc-lint.sh +++ b/.github/scripts/tc-lint.sh @@ -75,7 +75,7 @@ function helm_lint() { # TODO: If there are ci/*values.yaml files, lint those # and skip linting the top-level values.yaml. - if [[ ! $(ls $chart_path/ci/*values.yaml) ]]; then + if ! compgen -G "$chart_path/ci/*values.yaml" >/dev/null; then if echo "$helm_lint_output" | grep -q "Fail:"; then helm_lint_exit_code=1 fi