Method: Lono::Utils::Rsync#sh

Defined in:
lib/lono/utils/rsync.rb

#sh(command) ⇒ Object



5
6
7
8
9
10
11
12
# File 'lib/lono/utils/rsync.rb', line 5

def sh(command)
  puts "=> #{command}"
  out = `#{command}`
  puts out if ENV['LONO_DEBUG_SH']
  success = $?.success?
  raise("ERROR: running command #{command}").color(:red) unless success
  success
end