mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-11 00:52:55 +00:00
Fix some comment nits.
This commit is contained in:
@@ -96,10 +96,11 @@ func NewCmdBuild(
|
||||
// Validate validates build command.
|
||||
func (o *Options) Validate(args []string) error {
|
||||
if len(args) > 1 {
|
||||
return errors.New("specify one path to " + pgmconfig.KustomizationFileNames[0])
|
||||
return errors.New(
|
||||
"specify one path to " + pgmconfig.KustomizationFileNames[0])
|
||||
}
|
||||
if len(args) == 0 {
|
||||
o.kustomizationPath = "./"
|
||||
o.kustomizationPath = loader.CWD
|
||||
} else {
|
||||
o.kustomizationPath = args[0]
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ func TestBuildValidate(t *testing.T) {
|
||||
path string
|
||||
erMsg string
|
||||
}{
|
||||
{"noargs", []string{}, "./", ""},
|
||||
{"noargs", []string{}, ".", ""},
|
||||
{"file", []string{"beans"}, "beans", ""},
|
||||
{"path", []string{"a/b/c"}, "a/b/c", ""},
|
||||
{"path", []string{"too", "many"},
|
||||
@@ -54,7 +54,7 @@ func TestBuildValidate(t *testing.T) {
|
||||
continue
|
||||
}
|
||||
if e != nil {
|
||||
t.Errorf("%s: unknown error %v", mycase.name, e)
|
||||
t.Errorf("%s: unknown error: %v", mycase.name, e)
|
||||
continue
|
||||
}
|
||||
if opts.kustomizationPath != mycase.path {
|
||||
|
||||
Reference in New Issue
Block a user