lib/metacon/loaders/helpers.rb in metacon-0.1.6 vs lib/metacon/loaders/helpers.rb in metacon-0.2.0
- old
+ new
@@ -1,13 +1,14 @@
module MetaCon
module Loaders
module Helpers
def included(by); by.extend(self) end
- def cmd(cmd_string, echo=true)
+ def shcmd(cmd_string, echo=true)
require 'open3'
main_out = ''
err_out = ''
exit_status = 1
+ $stout.puts(cmd_string) if echo
Open3.popen3('/usr/bin/env bash -s') do |stdin, stdout, stderr, wth|
stdin.puts cmd_string
stdin.flush
stdin.close
loop do