From a6ce432893857573684fe411aa393953aa548e83 Mon Sep 17 00:00:00 2001 From: Zach Graziano Date: Tue, 3 Dec 2024 12:17:59 -0500 Subject: [PATCH] Add workaround flags to altsrc --- internal/commands/altsrc/flaginit.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/internal/commands/altsrc/flaginit.go b/internal/commands/altsrc/flaginit.go index 51818d8..16b480d 100644 --- a/internal/commands/altsrc/flaginit.go +++ b/internal/commands/altsrc/flaginit.go @@ -4,6 +4,7 @@ import ( "context" "errors" + "github.com/hathora/ci/internal/workaround" "github.com/urfave/cli/v3" ) @@ -182,5 +183,17 @@ func getSourcesFromFlag(flag cli.Flag) []cli.ValueSource { } } + if flag, ok := flag.(*workaround.IntFlag); ok { + if flag.Sources.Chain != nil { + sources = append(sources, flag.Sources.Chain...) + } + } + + if flag, ok := flag.(*workaround.FloatFlag); ok { + if flag.Sources.Chain != nil { + sources = append(sources, flag.Sources.Chain...) + } + } + return sources }