Skip to content

Commit

Permalink
fix: send verification publishing message to stderr when json output
Browse files Browse the repository at this point in the history
  • Loading branch information
bethesque committed Dec 9, 2017
1 parent f2cffe2 commit 568f511
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/pact/provider/verification_results/publish.rb
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def publish_verification_results

if response.code.start_with?("2")
new_resource_url = JSON.parse(response.body)['_links']['self']['href']
$stdout.puts "INFO: Verification results published to #{new_resource_url}"
Pact.configuration.output_stream.puts "INFO: Verification results published to #{new_resource_url}"
else
raise PublicationError.new("Error returned from verification results publication #{response.code} #{response.body}")
end
Expand Down
3 changes: 2 additions & 1 deletion lib/pact/tasks/task_helper.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
require 'pact/configuration'
require 'pact/provider/pact_helper_locator'
require 'rake/file_utils'
require 'shellwords'
Expand Down Expand Up @@ -36,7 +37,7 @@ def verify_command pact_helper, pact_uri, rspec_opts
end

def execute_cmd command
$stdout.puts command
Pact.configuration.output_stream.puts command
temporarily_set_env_var 'PACT_EXECUTING_LANGUAGE', 'ruby' do
temporarily_set_env_var 'PACT_INTERACTION_RERUN_COMMAND', PACT_INTERACTION_RERUN_COMMAND do
exit_status = system(command) ? 0 : 1
Expand Down

0 comments on commit 568f511

Please sign in to comment.