lib/lxc/shell.rb in lxc-ruby-0.3.1 vs lib/lxc/shell.rb in lxc-ruby-0.3.2

- old
+ new

@@ -86,9 +86,14 @@ cmd = "" cmd << "sudo " if use_sudo == true cmd << "#{command_name} #{args.join(' ')}".strip cmd << " | #{yield}" if block_given? + # Debug if LXC_DEBUG env is set + if ENV["LXC_DEBUG"] + puts "Executing: #{cmd}" + end + child = POSIX::Spawn::Child.new(cmd.strip) child.out end end end \ No newline at end of file