@@ -18,15 +18,15 @@ func ValidateCommands(commands []v1alpha2.Command, components []v1alpha2.Compone
1818
1919 err := v1alpha2 .CheckDuplicateKeys (commands )
2020 if err != nil {
21- multierror .Append (returnedErr , err )
21+ returnedErr = multierror .Append (returnedErr , err )
2222 }
2323
2424 for _ , command := range commands {
2525 // parentCommands is a map to keep a track of all the parent commands when validating the composite command's subcommands recursively
2626 parentCommands := make (map [string ]string )
2727 err := validateCommand (command , parentCommands , commandMap , components )
2828 if err != nil {
29- multierror .Append (returnedErr , resolveErrorMessageWithImportAttributes (err , command .Attributes ))
29+ returnedErr = multierror .Append (returnedErr , resolveErrorMessageWithImportAttributes (err , command .Attributes ))
3030 }
3131
3232 commandGroup := getGroup (command )
@@ -37,7 +37,7 @@ func ValidateCommands(commands []v1alpha2.Command, components []v1alpha2.Compone
3737
3838 for groupKind , commands := range groupKindCommandMap {
3939 if err := validateGroup (commands , groupKind ); err != nil {
40- multierror .Append (returnedErr , err )
40+ returnedErr = multierror .Append (returnedErr , err )
4141 }
4242 }
4343
0 commit comments