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.
|
||||
// If the provided value is invalid it is ignored.
|
||||
if v, ok := env.Lookup(cmd.Context(), envOutputFormat); ok {
|
||||
if err := f.output.Set(v); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
// QQQ log the error?
|
||||
_ = f.output.Set(v)
|
||||
}
|
||||
|
||||
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
|
||||
go func() {
|
||||
if err := cb.srv.Serve(cb.ln); err != http.ErrServerClosed {
|
||||
panic(err)
|
||||
}
|
||||
_ = cb.srv.Serve(cb.ln)
|
||||
}()
|
||||
return cb, nil
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue