File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -111,9 +111,15 @@ export class Publisher {
111
111
instance . once ( 'close' , ( code ) => {
112
112
const o = output . join ( '\n' ) ;
113
113
const pactUrls = / h t t p s ? : \/ \/ .* \/ p a c t s \/ .* $ / gim. exec ( o ) ;
114
- if ( code !== 0 || ! pactUrls ) {
115
- logger . error ( `Could not publish pact:\n${ o } ` ) ;
116
- return reject ( new Error ( o ) ) ;
114
+ if ( code !== 0 ) {
115
+ const message = `Pact publication failed with non-zero exit code. Full output was:\n${ o } ` ;
116
+ logger . error ( message ) ;
117
+ return reject ( new Error ( message ) ) ;
118
+ }
119
+ if ( ! pactUrls ) {
120
+ const message = `Publication appeared to fail, as we did not detect any pact URLs in the following output:\n${ o } ` ;
121
+ logger . error ( message ) ;
122
+ return reject ( new Error ( message ) ) ;
117
123
}
118
124
119
125
logger . info ( o ) ;
You can’t perform that action at this time.
0 commit comments