Skip to content

Commit

Permalink
Merge branch 'master' into feat/v2-mock-server
Browse files Browse the repository at this point in the history
  • Loading branch information
rholshausen committed Jul 10, 2024
2 parents 3c0e897 + dee4280 commit 00ef686
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion rust/pact_consumer/src/mock_server/http_mock_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,9 @@ impl ValidatingHttpMockServer {
Ok(())
} else {
// Failure. Format our errors.
let size = termsize::get().map(|sz| sz.cols).unwrap_or(120) - 2;
let size = termsize::get()
.map(|sz| if sz.cols > 2 { sz.cols - 2 } else { 0 })
.unwrap_or(78);
let pad = "-".repeat(size as usize);
let mut msg = format!(" {} \nMock server {} failed verification:\n", pad, self.description);
for mismatch in mismatches {
Expand Down

0 comments on commit 00ef686

Please sign in to comment.