diff --git a/internal/blueprint/blueprint.go b/internal/blueprint/blueprint.go index 836f734ab..a5e0bdb10 100644 --- a/internal/blueprint/blueprint.go +++ b/internal/blueprint/blueprint.go @@ -101,13 +101,13 @@ func (b *Blueprint) Initialize() error { return fmt.Errorf("Error hashing passwords: %s", err.Error()) } - for i, p := range b.Packages { - if len(p.Name) == 0 { + for i, pkg := range b.Packages { + if pkg.Name == "" { var errMsg string - if len(p.Version) == 0 { + if pkg.Version == "" { errMsg = fmt.Sprintf("Entry #%d has no name.", i+1) } else { - errMsg = fmt.Sprintf("Entry #%d has version '%v' but no name.", i+1, p.Version) + errMsg = fmt.Sprintf("Entry #%d has version '%v' but no name.", i+1, pkg.Version) } return fmt.Errorf("All package entries need to contain the name of the package. %s", errMsg) }