Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Support --quiet option #292

Merged
merged 1 commit into from

2 participants

@sethvargo
Owner

It would be great if I could make berkshelf STFU (on Jenkins for example) just like bundler's --quiet flag.

@sethvargo
Owner

This turned out to be a lot easier than originally expected. Converted the issue to a PR

@reset reset merged commit cf68305 into berkshelf:master

1 check failed

Details default The Travis build failed
@sethvargo sethvargo deleted the unknown repository branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 16, 2013
  1. @sethvargo

    add --quiet option

    sethvargo authored
This page is out of date. Refresh to see the latest.
Showing with 9 additions and 0 deletions.
  1. +9 −0 lib/berkshelf/cli.rb
View
9 lib/berkshelf/cli.rb
@@ -22,6 +22,10 @@ def initialize(*args)
Berkshelf::Config.path = @options[:config]
end
+ if @options[:quiet]
+ Berkshelf.ui.mute!
+ end
+
Berkshelf.set_format @options[:format]
@options = options.dup # unfreeze frozen options Hash from Thor
end
@@ -46,6 +50,11 @@ def initialize(*args)
desc: "Output format to use.",
aliases: "-F",
banner: "FORMAT"
+ class_option :quiet,
+ type: :boolean,
+ desc: "Silence all informational output.",
+ aliases: "-q",
+ default: false
method_option :force,
type: :boolean,
Something went wrong with that request. Please try again.