-
Notifications
You must be signed in to change notification settings - Fork 89
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
global: add a -q/--quiet flag #87
Conversation
This fixes #86
Cool 👍 I was gonna say, I think there's a thor option for |
@@ -10,6 +10,12 @@ def call(env) | |||
exit 1 | |||
end | |||
|
|||
# If the user passes the global `-q/--quiet` flag, redirect | |||
# stdout | |||
if env["user_quiet"] == true |
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.
Nitpicking but I think we can remove == true
here as it will be nil when not passed, and it is more idiomatic.
LGTM. 👍 |
@@ -9,6 +9,8 @@ class CLI < Thor | |||
|
|||
!check_unknown_options | |||
|
|||
class_option :quiet, type: :boolean, aliases: "-q" |
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.
More of a general question since Ruby 1.9 syntax is being used here: Should we move away from supporting 1.8.7? I believe the latest release of Tugboat still works with 1.8.7.
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.
@blom Yea, we probably should, right? What do you think?
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.
@pearkes Yeah, hopefully most users have moved to 1.9 or higher by now.
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.
this wasn't clear from the readme, please have a note there, it's confusing that you cannot get it to work out of the box in ubuntu 12.04
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.
@bubenkoff Gotcha, to confirm you mean that we should make a note that you must be using > Ruby 1.9
?
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.
yes, sorry if it wasn't clear
On 17 February 2014 17:48, Jack Pearkes [email protected] wrote:
In lib/tugboat/cli.rb:
@@ -9,6 +9,8 @@ class CLI < Thor
!check_unknown_options
- class_option :quiet, type: :boolean, aliases: "-q"
@bubenkoff https://github.com/bubenkoff Gotcha, to confirm you mean
that we should make a note that you must be using > Ruby 1.9?Reply to this email directly or view it on GitHubhttps://github.com//pull/87/files#r9797545
.
Anatoly Bubenkov
Cool, thanks, merging this sucker. |
This fixes #86