diff --git a/cmd/batch-job-common-types.go b/cmd/batch-job-common-types.go index 894c2264d..3c256378b 100644 --- a/cmd/batch-job-common-types.go +++ b/cmd/batch-job-common-types.go @@ -213,11 +213,14 @@ func (b BatchJobSnowball) Validate() error { } } _, err := humanize.ParseBytes(*b.SmallerThan) - return BatchJobYamlErr{ - line: b.line, - col: b.col, - msg: err.Error(), + if err != nil { + return BatchJobYamlErr{ + line: b.line, + col: b.col, + msg: err.Error(), + } } + return nil } // BatchJobSizeFilter supports size based filters - LesserThan and GreaterThan