mirror of https://github.com/databricks/cli.git
rm risky panics
This commit is contained in:
parent
8e77be3a9e
commit
207c5fd02a
|
@ -21,9 +21,8 @@ func initOutputFlag(cmd *cobra.Command) *outputFlag {
|
||||||
// Configure defaults from environment, if applicable.
|
// Configure defaults from environment, if applicable.
|
||||||
// If the provided value is invalid it is ignored.
|
// If the provided value is invalid it is ignored.
|
||||||
if v, ok := env.Lookup(cmd.Context(), envOutputFormat); ok {
|
if v, ok := env.Lookup(cmd.Context(), envOutputFormat); ok {
|
||||||
if err := f.output.Set(v); err != nil {
|
// QQQ log the error?
|
||||||
panic(err)
|
_ = f.output.Set(v)
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
cmd.PersistentFlags().VarP(&f.output, "output", "o", "output type: text or json")
|
cmd.PersistentFlags().VarP(&f.output, "output", "o", "output type: text or json")
|
||||||
|
|
|
@ -54,9 +54,7 @@ func newCallback(ctx context.Context, a *PersistentAuth) (*callbackServer, error
|
||||||
}
|
}
|
||||||
cb.srv.Handler = cb
|
cb.srv.Handler = cb
|
||||||
go func() {
|
go func() {
|
||||||
if err := cb.srv.Serve(cb.ln); err != http.ErrServerClosed {
|
_ = cb.srv.Serve(cb.ln)
|
||||||
panic(err)
|
|
||||||
}
|
|
||||||
}()
|
}()
|
||||||
return cb, nil
|
return cb, nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue