Skip to content

Commit 7532d79

Browse files
committed
fixup_GetConfigFile
1 parent 3a55a4a commit 7532d79

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

internal/cli/config/config.go

+5-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,11 @@ type ctxValue string
6868

6969
// GetConfigFile returns the configuration file path from the context
7070
func GetConfigFile(ctx context.Context) string {
71-
return ctx.Value(ctxValue("config_file")).(string)
71+
res := ctx.Value(ctxValue("config_file"))
72+
if res == nil {
73+
return ""
74+
}
75+
return res.(string)
7276
}
7377

7478
// SetConfigFile sets the configuration file path in the context

0 commit comments

Comments
 (0)