mirror of
https://github.com/helm/helm.git
synced 2026-05-28 04:35:48 -04:00
Remove implicit support for helm lint current directory
Signed-off-by: Terry Howe <terrylhowe@gmail.com>
This commit is contained in:
parent
ff61915cda
commit
838c36a0f6
2 changed files with 12 additions and 4 deletions
|
|
@ -30,6 +30,7 @@ import (
|
|||
"helm.sh/helm/v4/pkg/chart/common"
|
||||
"helm.sh/helm/v4/pkg/chart/v2/lint/support"
|
||||
"helm.sh/helm/v4/pkg/cli/values"
|
||||
"helm.sh/helm/v4/pkg/cmd/require"
|
||||
"helm.sh/helm/v4/pkg/getter"
|
||||
)
|
||||
|
||||
|
|
@ -51,11 +52,9 @@ func newLintCmd(out io.Writer) *cobra.Command {
|
|||
Use: "lint PATH",
|
||||
Short: "examine a chart for possible issues",
|
||||
Long: longLintHelp,
|
||||
Args: require.MinimumNArgs(1),
|
||||
RunE: func(_ *cobra.Command, args []string) error {
|
||||
paths := []string{"."}
|
||||
if len(args) > 0 {
|
||||
paths = args
|
||||
}
|
||||
paths := args
|
||||
|
||||
if kubeVersion != "" {
|
||||
parsedKubeVersion, err := common.ParseKubeVersion(kubeVersion)
|
||||
|
|
|
|||
|
|
@ -91,6 +91,15 @@ func TestLintCmdWithKubeVersionFlag(t *testing.T) {
|
|||
runTestCmd(t, tests)
|
||||
}
|
||||
|
||||
func TestLintCmdRequiresArgs(t *testing.T) {
|
||||
tests := []cmdTestCase{{
|
||||
name: "lint without arguments should fail",
|
||||
cmd: "lint",
|
||||
wantError: true,
|
||||
}}
|
||||
runTestCmd(t, tests)
|
||||
}
|
||||
|
||||
func TestLintFileCompletion(t *testing.T) {
|
||||
checkFileCompletion(t, "lint", true)
|
||||
checkFileCompletion(t, "lint mypath", true) // Multiple paths can be given
|
||||
|
|
|
|||
Loading…
Reference in a new issue