mirror of https://github.com/databricks/cli.git
rm risky panics
This commit is contained in:
parent
207c5fd02a
commit
65b4f78331
|
@ -84,19 +84,14 @@ func initLogFlags(cmd *cobra.Command) *logFlags {
|
||||||
// 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(), envLogFile); ok {
|
if v, ok := env.Lookup(cmd.Context(), envLogFile); ok {
|
||||||
if err := f.file.Set(v); err != nil {
|
// QQQ log the error? here and below
|
||||||
panic(err)
|
_ = f.file.Set(v)
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if v, ok := env.Lookup(cmd.Context(), envLogLevel); ok {
|
if v, ok := env.Lookup(cmd.Context(), envLogLevel); ok {
|
||||||
if err := f.level.Set(v); err != nil {
|
_ = f.level.Set(v)
|
||||||
panic(err)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if v, ok := env.Lookup(cmd.Context(), envLogFormat); ok {
|
if v, ok := env.Lookup(cmd.Context(), envLogFormat); ok {
|
||||||
if err := f.output.Set(v); err != nil {
|
_ = f.output.Set(v)
|
||||||
panic(err)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
flags := cmd.PersistentFlags()
|
flags := cmd.PersistentFlags()
|
||||||
|
|
Loading…
Reference in New Issue