diff --git a/pkg/devfile/devfile.go b/pkg/devfile/devfile.go index 92e468ce0c2..31cbb2fcd9f 100644 --- a/pkg/devfile/devfile.go +++ b/pkg/devfile/devfile.go @@ -2,11 +2,11 @@ package devfile import ( "fmt" - "strings" "github.com/devfile/library/v2/pkg/devfile" "github.com/devfile/library/v2/pkg/devfile/parser" + "k8s.io/utils/pointer" "github.com/redhat-developer/odo/pkg/devfile/validate" "github.com/redhat-developer/odo/pkg/log" @@ -44,7 +44,10 @@ func parseDevfile(args parser.ParserArgs) (parser.DevfileObj, error) { // ParseAndValidateFromFile reads, parses and validates devfile from a file // if there are warning it logs them on stdout func ParseAndValidateFromFile(devfilePath string) (parser.DevfileObj, error) { - return parseDevfile(parser.ParserArgs{Path: devfilePath}) + return parseDevfile(parser.ParserArgs{ + Path: devfilePath, + FlattenedDevfile: pointer.Bool(false), + }) } // ParseAndValidateFromFileWithVariables reads, parses and validates devfile from a file @@ -54,6 +57,7 @@ func ParseAndValidateFromFileWithVariables(devfilePath string, variables map[str return parseDevfile(parser.ParserArgs{ Path: devfilePath, ExternalVariables: variables, + FlattenedDevfile: pointer.Bool(false), }) }