-
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
Make trim space optional #1675
Merged
Merged
Make trim space optional #1675
Conversation
This file contains 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
This adds a new field to the `FlagStringSlice` struct for controlling the trimming of space when parsing arguments. The new field is called `NoTrimSpace` and trims space by default. This is to not break existing programs that depends on this behavior. See #1649 (comment) for further details.
This commits addresses the following comment: #1649 (comment) String slice flag values from environment now follows the same rules as parsed values.
@skelouse Can you check if this fixes #1649 (comment) ? |
Looks good, although KeepSpaces may be better, as !KeepSpaces is easier to read than !NoTrimSpaces. I'll approve with this change or a valid reason to keep it as |
Agreed |
skelouse
approved these changes
Jan 31, 2023
mudler
referenced
this pull request
in kairos-io/provider-kairos
Feb 6, 2023
[](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [github.com/urfave/cli/v2](https://togithub.com/urfave/cli) | require | patch | `v2.24.2` -> `v2.24.3` | --- ### Release Notes <details> <summary>urfave/cli</summary> ### [`v2.24.3`](https://togithub.com/urfave/cli/releases/tag/v2.24.3) [Compare Source](https://togithub.com/urfave/cli/compare/v2.24.2...v2.24.3) #### What's Changed - Make trim space optional by [@​palsivertsen](https://togithub.com/palsivertsen) in [https://github.com/urfave/cli/pull/1675](https://togithub.com/urfave/cli/pull/1675) **Full Changelog**: urfave/cli@v2.24.2...v2.24.3 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/kairos-io/provider-kairos). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNC4xMTkuNSIsInVwZGF0ZWRJblZlciI6IjM0LjExOS41In0=--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
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.
What type of PR is this?
What this PR does / why we need it:
This PR makes trimming space from string slice values optional (opt in) to not break backward compatibility.
See discussion from #1649 (comment) and onwards.
Which issue(s) this PR fixes:
Fixes #1648
Testing
Release Notes