<#506 CLI parameters with spaces broken since v14....
# pact-js-development
g
#506 CLI parameters with spaces broken since v14.3.5 Issue created by gruntster Software versions • OS: Ubuntu 24.04 LTS • Pact Node version: v12.5.0 • Node Version: v20.13.0 • Other Versions: pact-core v14.3.6 Issue Checklist Please confirm the following: ☑︎ I have upgraded to the latest ☑︎ I have the read the FAQs in the Readme ☑︎ I have triple checked, that there are no unhandled promises in my code ☐ I have set my log level to debug and attached a log file showing the complete request/response cycle ☐ For bonus points and virtual high fives, I have created a reproduceable git repository (see below) to illustrate the problem Expected behaviour CLIs handle quoted parameters with spaces, e.g.
"my pact.json"
, as a single parameter. Actual behaviour Since v14.3.5, CLIs now treat quoted parameters as individual parameters, e.g.
"my pact.json"
is treated as two parameters
my
pact.json
. Steps to reproduce An easy way to reproduce the issue is to run a CLI from v14.3.5 or v14.3.6 using npx. e.g.
npx --package=@pact-foundation/pact-core@14.3.5 -c 'pact-broker publish "my pact.json" --consumer-app-version 1'
The error output highlights that the filename (in bold) has been truncated at the space.
Specified pact file 'my' does not exist.
Compared to running the same command with v14.3.4.
npx --package=@pact-foundation/pact-core@14.3.4 -c 'pact-broker publish "my pact.json" --consumer-app-version 1'
Specified pact file 'my pact.json' does not exist.
pact-foundation/pact-js-core