Skip to content

Commit

Permalink
Testing
Browse files Browse the repository at this point in the history
Signed-off-by: Dusan Malusev <dmalusev@nanointeractive.com>
  • Loading branch information
Dusan Malusev committed Dec 14, 2023
1 parent 9602e7c commit 9b844b7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion cmd/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,13 @@ func PersistentPreRunE[T any](cfgFn func() (T, error), persistentPreRunE func(co
return func(cmd *cobra.Command, args []string) error {
ctx := cmd.Context()
cfgVal := ctx.Value(ConfigContextKey)
cfgVal2 := ctx.Value(string(ConfigContextKey))

if cfgVal != nil {
if cfgVal2 != nil {
cfgVal = cfgVal2
}

if cfgVal == nil {
cfg, err := cfgFn()
if err != nil {
return err
Expand Down

0 comments on commit 9b844b7

Please sign in to comment.