Skip to content

Commit

Permalink
chore: warn if fail_if_no_pacts_found is true and no pacts found
Browse files Browse the repository at this point in the history
  • Loading branch information
YOU54F committed Aug 6, 2024
1 parent 0145d2d commit b342955
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/pact/pact_broker/fetch_pact_uris_for_verification.rb
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,11 @@ def log_message

def handling_no_pacts_found
pacts_found = yield
if pacts_found.blank? && options[:fail_if_no_pacts_found] != false
raise "No pacts found to verify"
else
pacts_found
raise "No pacts found to verify" if pacts_found.blank? && options[:fail_if_no_pacts_found] != false
if pacts_found.blank? && options[:fail_if_no_pacts_found] == false
Pact.configuration.output_stream.puts "WARN: No pacts found to verify & fail_if_no_pacts_found is set to false."
end
pacts_found
end
end
end
Expand Down

0 comments on commit b342955

Please sign in to comment.