Skip to content
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

Conflicting documentation in manual for flag precedence #1033

Closed
3 tasks done
xiegeo opened this issue Jan 1, 2020 · 5 comments
Closed
3 tasks done

Conflicting documentation in manual for flag precedence #1033

xiegeo opened this issue Jan 1, 2020 · 5 comments
Labels
area/v2 relates to / is being considered for v2 help wanted please help if you can! kind/bug describes or fixes a bug status/confirmed confirmed to be valid, but work has yet to start
Milestone

Comments

@xiegeo
Copy link

xiegeo commented Jan 1, 2020

my urfave/cli version is

2.1.1

Checklist

  • Are you running the latest v2 release? The list of releases is here.
  • Did you check the manual for your release? The v2 manual is here
  • Did you perform a search about this problem? Here's the Github guide about searching.

Describe the bug

Under https://github.com/urfave/cli/blob/master/docs/v2/manual.md#values-from-files

Note that default values set from file (e.g. FilePath) take precedence over default values set from the environment (e.g. EnvVar).

But at https://github.com/urfave/cli/blob/master/docs/v2/manual.md#precedence

  1. Environment variable (if specified)
  2. Configuration file (if specified)

Expected behavior

Consistency withing documentation and between documentation and code.

@xiegeo xiegeo added status/triage maintainers still need to look into this kind/bug describes or fixes a bug area/v2 relates to / is being considered for v2 labels Jan 1, 2020
@coilysiren coilysiren added help wanted please help if you can! status/confirmed confirmed to be valid, but work has yet to start and removed status/triage maintainers still need to look into this labels Jan 3, 2020
@coilysiren
Copy link
Member

I don't know which precedence is correct off-hand, and would appreciate if someone could research that and update the manual 👍 I marked this with help wanted for anyone to pick up.

@stale
Copy link

stale bot commented Apr 3, 2020

This issue or PR has been automatically marked as stale because it has not had recent activity. Please add a comment bumping this if you're still interested in it's resolution! Thanks for your help, please let us know if you need anything else.

@stale stale bot added the status/stale stale due to the age of it's last update label Apr 3, 2020
@stale
Copy link

stale bot commented May 3, 2020

Closing this as it has become stale.

@stale stale bot closed this as completed May 3, 2020
@meatballhat meatballhat reopened this Apr 22, 2022
@meatballhat meatballhat removed the status/stale stale due to the age of it's last update label Apr 22, 2022
@meatballhat meatballhat changed the title v2 bug: conflicting documentation in manual for flag precedence Conflicting documentation in manual for flag precedence Apr 22, 2022
@dearchap
Copy link
Contributor

Documentation has been corrected to reflect actual behavior

@zc-devs
Copy link

zc-devs commented Feb 17, 2024

Documentation has been corrected to reflect actual behavior

Could you point me to PR or Commit?

Actually not:

Note that default values set from file (e.g. FilePath) take precedence over default values set from the environment (e.g. EnvVar)

The precedence for flag value sources is as follows (highest to lowest):
Environment variable (if specified)
Configuration file (if specified)

Should be reopened.

#1866

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/v2 relates to / is being considered for v2 help wanted please help if you can! kind/bug describes or fixes a bug status/confirmed confirmed to be valid, but work has yet to start
Projects
None yet
Development

No branches or pull requests

5 participants