This repository was archived by the owner on Apr 14, 2021. It is now read-only.
[CLI] Dont print defaults in the command printed with --verbose#5791
Merged
bundlerbot merged 2 commits intomasterfrom Jun 20, 2017
Merged
[CLI] Dont print defaults in the command printed with --verbose#5791bundlerbot merged 2 commits intomasterfrom
bundlerbot merged 2 commits intomasterfrom
Conversation
colby-swandale
approved these changes
Jun 20, 2017
Member
|
@bundlerbot r+ |
Collaborator
|
📌 Commit 4614ed4 has been approved by |
Collaborator
bundlerbot
added a commit
that referenced
this pull request
Jun 20, 2017
…lby-swandale
[CLI] Dont print defaults in the command printed with --verbose
### What was the end-user problem that led to this PR?
The problem was that running `bundle lock --verbose` would print
Running `bundle lock --add-platform --remove-platform --verbose` with bundler 1.15.1
even though the platform flags were never specified. This was surfaced by #5724, which will be fixed by this PR.
### Was was your diagnosis of the problem?
My diagnosis was that default values of options were being printed.
### What is your fix for the problem, implemented in this PR?
My fix is to filter out the default values before getting Thor
### Why did you choose this fix out of the possible options?
I chose this fix because there is no way, within the `CLI` instance, to tell which flags the user has explicitly given, so I felt that filtering out those options that had default values was the next-best thing.
Collaborator
|
💔 Test failed - status-travis |
Contributor
Author
|
I guess we need to sort the options so the output is consistent on 1.8.7 |
Member
|
Yea 👍 , sorry i approved this prematurely. |
Contributor
Author
|
No worries! It's fine to approve stuff even if it doesn't end up passing, that's what CI is for |
Contributor
Author
|
@bundlerbot r=colby-swandale |
Collaborator
|
📌 Commit 531d52f has been approved by |
Collaborator
bundlerbot
added a commit
that referenced
this pull request
Jun 20, 2017
…lby-swandale
[CLI] Dont print defaults in the command printed with --verbose
### What was the end-user problem that led to this PR?
The problem was that running `bundle lock --verbose` would print
Running `bundle lock --add-platform --remove-platform --verbose` with bundler 1.15.1
even though the platform flags were never specified. This was surfaced by #5724, which will be fixed by this PR.
### Was was your diagnosis of the problem?
My diagnosis was that default values of options were being printed.
### What is your fix for the problem, implemented in this PR?
My fix is to filter out the default values before getting Thor
### Why did you choose this fix out of the possible options?
I chose this fix because there is no way, within the `CLI` instance, to tell which flags the user has explicitly given, so I felt that filtering out those options that had default values was the next-best thing.
Collaborator
|
☀️ Test successful - status-travis |
segiddins
pushed a commit
that referenced
this pull request
Jul 17, 2017
…lby-swandale
[CLI] Dont print defaults in the command printed with --verbose
### What was the end-user problem that led to this PR?
The problem was that running `bundle lock --verbose` would print
Running `bundle lock --add-platform --remove-platform --verbose` with bundler 1.15.1
even though the platform flags were never specified. This was surfaced by #5724, which will be fixed by this PR.
### Was was your diagnosis of the problem?
My diagnosis was that default values of options were being printed.
### What is your fix for the problem, implemented in this PR?
My fix is to filter out the default values before getting Thor
### Why did you choose this fix out of the possible options?
I chose this fix because there is no way, within the `CLI` instance, to tell which flags the user has explicitly given, so I felt that filtering out those options that had default values was the next-best thing.
(cherry picked from commit de7d488)
# Conflicts:
# lib/bundler/cli.rb
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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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 was the end-user problem that led to this PR?
The problem was that running
bundle lock --verbosewould printeven though the platform flags were never specified. This was surfaced by #5724, which will be fixed by this PR.
Was was your diagnosis of the problem?
My diagnosis was that default values of options were being printed.
What is your fix for the problem, implemented in this PR?
My fix is to filter out the default values before getting Thor
Why did you choose this fix out of the possible options?
I chose this fix because there is no way, within the
CLIinstance, to tell which flags the user has explicitly given, so I felt that filtering out those options that had default values was the next-best thing.