fix: Forbid extraneous arguments (#348)

Resolves #296
This commit is contained in:
KUOKA Yusuke 2018-09-20 09:12:12 +09:00 committed by GitHub
parent 9808849986
commit 5d1a92d3a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -582,6 +582,11 @@ func findAndIterateOverDesiredStatesUsingFlags(c *cli.Context, converge func(*st
}
func findAndIterateOverDesiredStatesUsingFlagsWithReverse(c *cli.Context, reverse bool, converge func(*state.HelmState, helmexec.Interface) []error) error {
if c.NArg() > 0 {
cli.ShowAppHelp(c)
return fmt.Errorf("err: extraneous arguments: %s", strings.Join(c.Args(), ", "))
}
fileOrDir := c.GlobalString("file")
kubeContext := c.GlobalString("kube-context")
namespace := c.GlobalString("namespace")