mirror of
https://github.com/mudler/luet.git
synced 2025-07-07 04:18:47 +00:00
Log debug before failing (#263)
If a plugin failed, we were skipping the debug info which is kind of useful :=) Signed-off-by: Itxaka <igarcia@suse.com>
This commit is contained in:
parent
e705c471eb
commit
1f0324c452
@ -88,10 +88,6 @@ func (b *Bus) Initialize(ctx *types.Context, plugin ...string) {
|
||||
|
||||
for _, e := range b.Manager.Events {
|
||||
b.Manager.Response(e, func(p *pluggable.Plugin, r *pluggable.EventResponse) {
|
||||
if r.Errored() {
|
||||
err := fmt.Sprintf("Plugin %s at %s had an error: %s", p.Name, p.Executable, r.Error)
|
||||
ctx.Fatal(err)
|
||||
}
|
||||
ctx.Debug(
|
||||
"plugin_event",
|
||||
"received from",
|
||||
@ -100,6 +96,10 @@ func (b *Bus) Initialize(ctx *types.Context, plugin ...string) {
|
||||
p.Executable,
|
||||
r,
|
||||
)
|
||||
if r.Errored() {
|
||||
err := fmt.Sprintf("Plugin %s at %s had an error: %s", p.Name, p.Executable, r.Error)
|
||||
ctx.Fatal(err)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user