lib/cli_template/git.rb in cli-template-4.0.1 vs lib/cli_template/git.rb in cli-template-4.0.2

- old
+ new

@@ -1,21 +1,19 @@ module CliTemplate class Git class << self def user_name - sh "git config --get user.name" + sh "git config --get user.name", mute: true end def user_email - sh "git config --get user.email" + sh "git config --get user.email", mute: true end - def sh(command) - puts "=> #{command}" + def sh(command, mute: false) + puts "=> #{command}" unless mute stdout = `#{command}` out = stdout.strip - puts "stdout #{stdout.inspect}" - puts "out #{out.inspect}" return out if !out&.empty? end end end end