Closed shavo007 closed 7 years ago
Ah, the pactUrls
requires the path to be absolute in the latest version. I'll update the docs accordingly, but for now patching your publish task like this should fix your problem:
var path = require('path');
pactUrls: [path.resolve(process.cwd(), 'pacts')],
that worked perfectly. thanks.
out of interest, @mefellows why is it absolute now instead of relative?
i will leave this issue opened for now until the doc has been updated.
Thanks @shavo007, I'll follow up on that, short answer is I'm not sure.
No worries mate
Looks like it was an unintended consequence (albeit if you provided it with a directory it needed to be absolute anyway), I'll raise an enhancement request. It seems fairly low priority though.
👍
Can there not just be some sensible defaults around this kind of stuff? Like make pactUrls
optional and just default it to /pacts under your project root?
Probably, we'll happily accept a PR if you're willing :)
Thanks for the opportunity! Very keen to. Hopefully soon!
Hi,
I have a sample project that I recently upgraded to 2.2.0.
https://github.com/shavo007/pact-demo/tree/dev-lees-js-consumer-upgrade/jsConsumer
If i run
gulp pact
the error in the logs is:I see the pact exists at jsConsumer/pacts/js_consumer-provider1.json
The opts defined in gulpfile are:
ENV:
Any clue?
Thanks. Shane.