-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Fix:(issue_2234): Include empty argument #2235
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
Open
bbadour
wants to merge
5
commits into
urfave:main
Choose a base branch
from
bbadour:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
+166
−10
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Use delegation to implement the Value+Flag paradigm used for other flag types. Implement all of the Flag interfaces except Count. Borrowed heavily from flag_bool.go and flag_generic.go Add context to the error message when setting an external flag's value to its default value to avoid cryptic error messages like: `"syntax error: expected file.go:234"` And suppress the error for odd-ball external flags that report the string representation of the zero-value of some structure as the default, but do not accept that string as input. Detect such odd-balls by their `Get()` method returning `nil`.
Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@v5...v6) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps the python-packages group with 1 update: [mkdocs-material](https://github.com/squidfunk/mkdocs-material). Updates `mkdocs-material` from 9.6.23 to 9.7.0 - [Release notes](https://github.com/squidfunk/mkdocs-material/releases) - [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG) - [Commits](squidfunk/mkdocs-material@9.6.23...9.7.0) --- updated-dependencies: - dependency-name: mkdocs-material dependency-version: 9.7.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: python-packages ... Signed-off-by: dependabot[bot] <support@github.com>
Include an empty argument and all subsequent arguments.
dearchap
reviewed
Nov 27, 2025
| // skip test flags | ||
| if !strings.HasPrefix(f.Name, ignoreFlagPrefix) { | ||
| cmd.Flags = append(cmd.Flags, &extFlag{f}) | ||
| cmd.Flags = append(cmd.Flags, &extFlag{f, ""}) |
Contributor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove this change from this PR.
dearchap
reviewed
Nov 27, 2025
| package cli | ||
|
|
||
| import "flag" | ||
| import ( |
Contributor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove this from PR
Contributor
|
@bbadour try to focus on one issue per PR. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Include an empty argument and all subsequent arguments.
What type of PR is this?
What this PR does / why we need it:
Sometimes command line arguments are empty strings.
i.e.
Which issue(s) this PR fixes:
Fixes #2234
Release Notes