lib/chake/backend.rb in chake-0.3.3 vs lib/chake/backend.rb in chake-0.4
- old
+ new
@@ -20,13 +20,13 @@
def rsync_dest
node.path + '/'
end
def run(cmd)
- puts "#{node.hostname}: $ #{cmd}"
+ printf "%#{Node.max_node_name_length}s: $ %s\n", node.hostname, cmd
output = IO.popen(command_runner + [cmd])
output.each_line do |line|
- puts [node.hostname, line.strip].join(': ')
+ printf "%#{Node.max_node_name_length}s: %s\n", node.hostname, line.strip
end
output.close
if $?
status = $?.exitstatus
if status != 0