fix: Fix nil deref in config set command
Currently if the user sets --auth.method without --auth.header, if defaultAuther isn't defined then there is a nil deref. Check for nil directly so we can give a helpeful error message instead.
This commit is contained in:
parent
f89975603e
commit
9310f5b8be
@ -99,7 +99,7 @@ func getProxyAuth(flags *pflag.FlagSet, defaultAuther map[string]interface{}) (a
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if header == "" {
|
||||
if header == "" && defaultAuther != nil{
|
||||
header = defaultAuther["header"].(string)
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user