Skip to content

Commit

Permalink
fix(helm): add check for argument length for inspection subcommands
Browse files Browse the repository at this point in the history
Fixes #1429
  • Loading branch information
poopoothegorilla committed Oct 21, 2016
1 parent 2eed3f0 commit 6eb0cbb
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cmd/helm/inspect.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ func newInspectCmd(c helm.Interface, out io.Writer) *cobra.Command {
Long: inspectValuesDesc,
RunE: func(cmd *cobra.Command, args []string) error {
insp.output = valuesOnly
if err := checkArgsLength(len(args), "chart name"); err != nil {
return err
}
cp, err := locateChartPath(args[0], insp.version, insp.verify, insp.keyring)
if err != nil {
return err
Expand All @@ -105,6 +108,9 @@ func newInspectCmd(c helm.Interface, out io.Writer) *cobra.Command {
Long: inspectChartDesc,
RunE: func(cmd *cobra.Command, args []string) error {
insp.output = chartOnly
if err := checkArgsLength(len(args), "chart name"); err != nil {
return err
}
cp, err := locateChartPath(args[0], insp.version, insp.verify, insp.keyring)
if err != nil {
return err
Expand Down

0 comments on commit 6eb0cbb

Please sign in to comment.