1
0

feat: use all available kernels in case of no targets defined

This commit is contained in:
dump_stack() 2023-05-21 14:40:24 +00:00
parent b88ab7cca3
commit ba03d4a049
Signed by: dump_stack
GPG Key ID: BE44DA8C062D87DC

14
pew.go
View File

@ -90,6 +90,20 @@ func (cmd *PewCmd) Run(g *Globals) (err error) {
return
}
if len(ka.Targets) == 0 {
log.Debug().Msg("no targets defined in .out-of-tree.toml, " +
"will use all available")
for _, dist := range distro.List() {
ka.Targets = append(ka.Targets, config.Target{
Distro: dist,
Kernel: config.Kernel{
Regex: ".*",
},
})
}
}
if ka.SourcePath == "" {
ka.SourcePath = g.WorkDir
}