From bb3d95d13a8acf11248cceba4abc768d5dccc503 Mon Sep 17 00:00:00 2001 From: Uwe Krueger Date: Fri, 14 Oct 2022 11:04:00 +0200 Subject: [PATCH] fix dump for helm input with invalid path --- cmds/ocm/commands/ocmcmds/common/inputs/types/helm/spec.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cmds/ocm/commands/ocmcmds/common/inputs/types/helm/spec.go b/cmds/ocm/commands/ocmcmds/common/inputs/types/helm/spec.go index 265a0bd99..7b89a660c 100644 --- a/cmds/ocm/commands/ocmcmds/common/inputs/types/helm/spec.go +++ b/cmds/ocm/commands/ocmcmds/common/inputs/types/helm/spec.go @@ -48,8 +48,7 @@ func (s *Spec) Validate(fldPath *field.Path, ctx inputs.Context, inputFilePath s inputInfo, filePath, err := inputs.FileInfo(ctx, s.Path, inputFilePath) if err != nil { allErrs = append(allErrs, field.Invalid(path, filePath, err.Error())) - } - if !inputInfo.Mode().IsDir() && !inputInfo.Mode().IsRegular() { + } else if !inputInfo.Mode().IsDir() && !inputInfo.Mode().IsRegular() { allErrs = append(allErrs, field.Invalid(path, filePath, "no regular file or directory")) } }