diff --git a/build-server-crystal.cr b/build-server-crystal.cr index 1a6f986..120ac3b 100644 --- a/build-server-crystal.cr +++ b/build-server-crystal.cr @@ -3,17 +3,18 @@ require "kemal" strategies_dir = ENV.fetch("STRATEGIES_DIR") post "/:strategy" do |env| - stdout = IO::Memory.new + output = IO::Memory.new Process.run( "#{strategies_dir}/#{env.params.url["strategy"]}", [ env.params.query.to_h.to_json, env.params.json.to_json ], - output: stdout, + output: output, + error: output, ) - puts stdout.to_s - stdout.to_s + puts output.to_s + output.to_s end Kemal.run diff --git a/test/strategy b/test/strategy index afe606b..809115b 100755 --- a/test/strategy +++ b/test/strategy @@ -1,3 +1,6 @@ #!/usr/bin/env sh echo "hello world!" +echo "ohno" &1>2 +echo "hello world 2!" +echo "ohno 2" &1>2