flux-check-hook
flux-check-hook copied to clipboard
Linting fails with Helm v3.8.2 or later
When running the pre-commit hook with a Helm binary v3.8.2 or later (possibly earlier versions as well), the hook will always fail with:
==> Linting *.tgz
Error unable to open tarball: open *.tgz: The filename, directory name, or volume label syntax is incorrect
The problem is ultimately caused by this line, which specifies the chart as *.tgz
, rather than f"{quote(chartName)}-{quote(chartVersion)}.tgz"
.
I'm not familiar enough with Helm artifacts to confirm that f"{quote(chartName)}-{quote(chartVersion)}.tgz"
covers every use case, but if somebody else can confirm then I can create a PR to fix the issue.
Just checked with the latest helm version and on my end it still works with the *.tgz, so I think this isn't related to the helm version but maybe based on your shell/os.
Independent of this, I think your change makes sense anyway, as it's more explicit/correct, if you can create a PR that would be great
Opened here: https://github.com/tarioch/flux-check-hook/pull/3
What platform/shell are you using? I'd like to verify the issue for my own sanity
Merged, thanks a lot. I'm using bash
Unfortunately this doesn't work if you have version wildcards. E.g.
helm pull --repo https://docs.renovatebot.com/helm-charts --version 32.x renovate
pulls down a file called renovate-32.118.0.tgz
I'm reverting this for now