Repository navigation
fix(install): return the error from NewTesting - #895
Open
Branson404 wants to merge 1 commit into
Open
Branson404 wants to merge 1 commit into
Branson404 wants to merge 1 commit into
Conversation
ct install printed the error from chart.NewTesting and carried on, so a failure to set up Helm (for example helm not on PATH) could end in exit status 0 when no charts were selected. ct lint and the other commands already return this error. Return it here too, with a regression test. Signed-off-by: Branson404 <78994175+branson404@users.noreply.github.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.
What this PR does / why we need it:
ct installprinted the error returned bychart.NewTestingand then carried on. If setting up Helm fails (for examplehelmis not onPATH) and no charts are selected, the command can finish with exit status 0, so a CI job looks green.ct lint,ct lint-and-installandct list-changedalready return this error; this makesct installdo the same.I added
TestInstallReturnsHelmLookupError. It runsct install --all --chart-dirs=with an emptyPATH. Without the change it fails withct install returned <nil>, want a Helm executable lookup error; with it, the error is returned.Which issue this PR fixes: none opened.
Special notes for your reviewer:
Ran in a
golangcontainer (Go 1.27):go vet ./...,gofmt -l .(no output) andgo test ./..., all packages pass. Not run:golangci-lint, the e2e script (needs a cluster), the other CI jobs. The commit is signed off (DCO), as recent merged PRs in this repo are.