We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3a55a4a commit 7532d79Copy full SHA for 7532d79
internal/cli/config/config.go
@@ -68,7 +68,11 @@ type ctxValue string
68
69
// GetConfigFile returns the configuration file path from the context
70
func GetConfigFile(ctx context.Context) string {
71
- return ctx.Value(ctxValue("config_file")).(string)
+ res := ctx.Value(ctxValue("config_file"))
72
+ if res == nil {
73
+ return ""
74
+ }
75
+ return res.(string)
76
}
77
78
// SetConfigFile sets the configuration file path in the context
0 commit comments