lib/hu/collab.rb in hu-1.3.22 vs lib/hu/collab.rb in hu-1.3.23

- old
+ new

@@ -32,14 +32,17 @@ text " then hu won't be able to see it anymore." if Hu::API_TOKEN.nil? text '' text "\e[1mWARNING: Environment variable 'HEROKU_API_KEY' must be set.\e[0m" end - filter do + opt :quiet, 'Quiet mode (no progress bar)', default: false + filter do |_cmd, opts, _argv| if Hu::API_TOKEN.nil? STDERR.puts "\e[0;31;1mERROR: Environment variable 'HEROKU_API_KEY' must be set.\e[0m" exit 1 end + $quiet = opts[:quiet] + $quiet = true unless STDOUT.isatty end def collab; end OP_COLORS = { '+' => "\e[0;1;32m",