Skip to content

Commit

Permalink
Add workaround flags to altsrc (#62)
Browse files Browse the repository at this point in the history
  • Loading branch information
zacharygraziano authored Dec 3, 2024
1 parent 027ba1a commit fd49a77
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions internal/commands/altsrc/flaginit.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"errors"

"github.com/hathora/ci/internal/workaround"
"github.com/urfave/cli/v3"
)

Expand Down Expand Up @@ -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
}

0 comments on commit fd49a77

Please sign in to comment.