Skip to content

Commit

Permalink
handling for .gitkeep and and reformatting for linter
Browse files Browse the repository at this point in the history
  • Loading branch information
dbw7 committed Nov 1, 2023
1 parent ba9c4dc commit fa5e60b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/build/rpm.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@ func (b *Builder) getRPMFileNames() ([]string, error) {
for _, rpmFile := range rpms {
rpmFileNames = append(rpmFileNames, rpmFile.Name())
}

if len(rpmFileNames) == 0 {
return nil, fmt.Errorf("no rpms found")
} else if len(rpmFileNames) == 1 && rpmFileNames[0] == ".gitkeep" {
return nil, fmt.Errorf("no rpms found")
}

return rpmFileNames, nil
Expand Down

0 comments on commit fa5e60b

Please sign in to comment.