feat: fail fast on regexp error
This commit is contained in:
parent
883c8ee6cb
commit
562abec7f4
@ -51,14 +51,17 @@ type DebianGetDebCmd struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (cmd DebianGetDebCmd) Run() (err error) {
|
func (cmd DebianGetDebCmd) Run() (err error) {
|
||||||
|
re, err := regexp.Compile(cmd.Regexp)
|
||||||
|
if err != nil {
|
||||||
|
log.Fatal().Err(err).Msg("regexp")
|
||||||
|
}
|
||||||
|
|
||||||
kernels, err := debian.GetKernels()
|
kernels, err := debian.GetKernels()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error().Err(err).Msg("")
|
log.Error().Err(err).Msg("")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
re := regexp.MustCompile(cmd.Regexp)
|
|
||||||
|
|
||||||
var packages []snapshot.Package
|
var packages []snapshot.Package
|
||||||
for _, kernel := range kernels {
|
for _, kernel := range kernels {
|
||||||
for _, pkg := range kernel.Packages() {
|
for _, pkg := range kernel.Packages() {
|
||||||
|
Loading…
Reference in New Issue
Block a user