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:
Brendan Jackman 2025-12-27 18:37:12 +01:00
parent f89975603e
commit 9310f5b8be

View File

@ -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)
}