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

Este commit está contenido en:
2023-05-21 14:40:24 +00:00
padre b88ab7cca3
commit ba03d4a049

14
pew.go
Ver fichero

@ -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
}