feat: add find-provides and find-requires (rpm only) #5

Merged
xpamych merged 2 commits from Maks1mS/ALR:feat/auto-provides-requires into master 2024-12-26 08:07:16 +00:00
Showing only changes of commit a711edbcc0 - Show all commits

@ -47,12 +47,15 @@ func rpmFindDependencies(ctx context.Context, pkgInfo *nfpm.Info, dirs types.Dir
cmd.Stdout = &out
cmd.Stderr = &stderr
if err := cmd.Run(); err != nil {
log.Error(stderr.String())
return err
}
dependencies := strings.Split(strings.TrimSpace(out.String()), "\n")
for _, dep := range dependencies {
updateFunc(dep)
if dep != "" {
updateFunc(dep)
}
}
return nil