Add quiet mode

Only log errors
This commit is contained in:
David Heinemeier Hansson
2023-02-01 14:10:51 +01:00
parent cdd77445d0
commit f06d639583
3 changed files with 14 additions and 9 deletions

View File

@@ -13,13 +13,13 @@ class Mrsk::Cli::Build < Mrsk::Cli::Base
run_locally do
begin
MRSK.verbosity(:debug) { execute *MRSK.builder.push }
MRSK.with_verbosity(:debug) { execute *MRSK.builder.push }
rescue SSHKit::Command::Failed => e
if e.message =~ /(no builder)|(no such file or directory)/
error "Missing compatible builder, so creating a new one first"
if cli.create
MRSK.verbosity(:debug) { execute *MRSK.builder.push }
MRSK.with_verbosity(:debug) { execute *MRSK.builder.push }
end
else
raise