lib/stencil/cmd.rb in stencil-0.1.5 vs lib/stencil/cmd.rb in stencil-0.1.8

- old
+ new

@@ -6,10 +6,17 @@ if cmd.nil? cmd, path = path, cmd else path = "cd #{path} && " end - `#{[ path, cmd ].compact.join}` + + output = `#{[ path, cmd ].compact.join} 2>&1` + + unless $?.success? + Msg.error "#{cmd}\n\n#{output}" + end + + output end end end end \ No newline at end of file