fix: prevent errors from clobbering terminal (#2161)

Signed-off-by: Keith Zantow <kzantow@gmail.com>
This commit is contained in:
Keith Zantow
2023-09-20 14:35:41 -04:00
committed by GitHub
parent 58f8c852df
commit 7d0d3e1977
5 changed files with 39 additions and 62 deletions
+5 -3
View File
@@ -46,10 +46,10 @@ func create(id clio.Identification) (clio.Application, *cobra.Command) {
return []clio.UI{noUI}, nil
}
h := handler.New(handler.DefaultHandlerConfig())
return []clio.UI{
ui.New(h, false, cfg.Log.Quiet),
ui.New(cfg.Log.Quiet,
handler.New(handler.DefaultHandlerConfig()),
),
noUI,
}, nil
},
@@ -60,7 +60,9 @@ func create(id clio.Identification) (clio.Application, *cobra.Command) {
// we can hoist them into the internal packages for global use.
stereoscope.SetBus(state.Bus)
bus.Set(state.Bus)
redact.Set(state.RedactStore)
log.Set(state.Logger)
stereoscope.SetLogger(state.Logger)