You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From this line of code, it looks like a flag with both OverrideDefaultFromEnvar and Required will cause the parsing to error out, even when an envar is present, since defaultValue is checked on L166 before it is overridden on L172.
That is incorrect. L166 is merely ensuring that users don't do .Default("value").Required(), as it's essentially a programmer error. Once that check is complete, defaultValue is set from the envar so that (later) execution of the context will pull the default value from the environment.
From this line of code, it looks like a flag with both
OverrideDefaultFromEnvar
andRequired
will cause the parsing to error out, even when an envar is present, since defaultValue is checked on L166 before it is overridden on L172.kingpin/flags.go
Line 165 in a727460
The text was updated successfully, but these errors were encountered: