-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Flag default value is overwritten by environment in help output. #1206
Comments
Maybe related to #1181 |
ping |
The default value can changes by Env value or config file, it is the design, not bug. |
@vipally Your comment is kinda confusing. According to your pull requests you do consider this as a bug ? |
Kindly ping @lynncyrin. Can someone of the devs please comment whether this is a bug or not? Thanks! |
👀 |
Because nobody is paid to pay attention to them 🙂 |
I think this is unambiguously a bug, the |
If the docs are currently expecting this behavior, then the docs should be changed too. I think this is a bug from a logical point of view, but I think it's also important to consider whether or not fixing this would be a breaking change... hopefully the bug here is only with the help text display. |
Thanks for looking in :D @vipally What about closing the duplicate issues and continue discussion here ? |
In fact, my PR pays no attention on whether ENV values change the default. |
@urfave/cli What do you all think ? We should change this to have defval instead of val from env for default ? |
If there was the option, I would use it right away. :D
I think this
Should give this
|
I’m a bit ambivalent here. First, I LOVE it. However, it still hurts how I found this “feature”:
I was presenting to my coworkers what a tool could achieve, which, apparently used urfave/cli. I’ve put my secrets into variables, just to make sure they’ll be kept hidden… and they were, until someone asked for a feature I vaguely remember about, and I had to look it up by looking at the subcommand’s help.
I’d say as much as I love them, I’d rather remove it.
--
-jul-
… On 2022. Oct 10., at AM 3:09, dearchap ***@***.***> wrote:
@urfave/cli <https://github.com/orgs/urfave/teams/cli> What do you all think ? We should change this to have defval instead of val from env for default ?
—
Reply to this email directly, view it on GitHub <#1206 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAAQUPSCHKFVTBVQN5KNDE3WCNUDTANCNFSM4T42MPCA>.
You are receiving this because you are on a team that was mentioned.
|
@julian7 users who can run |
I think it's not necessary to output env variable. For example when run |
my urfave/cli version is
v2.3.0
Describe the bug
Flag default value should never change in help output.
To reproduce
Build the following program against v2.3.0.
Observed behavior
What did you do?
What did you see happen immediately after the reproduction steps above?
What did you expect to see?
Expected behavior
Default value should never change (in help output).
The text was updated successfully, but these errors were encountered: