version: 1.14.0
platform: OSX
repro: I have the following script in my package.json
"test:integration:start": "cross-env-shell start-server-and-test \"node server.js\" https-get://localhost:3333 \"cypress run\"",
When I run yarn test:integration:start, it always splits up node and server.js and cypress and run, so it tries to launch the server using node, and then waits for a response at server.js. I've tried every combination of escaped double quotes or single quotes I can think of to get it to read those strings together, but to no avail.
-
expected behavior
start-server-and-test can read my strings without splitting on whitespace
-
actual behavior
Each string is split on whitespace, leading to the script incorrectly parsing the command.
I also tried pulling out the strings into environment variables, but got the same result.
I also tried putting each command into its own npm script, and while that does actually work, it runs the commands with npm rather than yarn. If I add the yarn prefix, it splits those 2 words apart as well (e.g. starts the server using yarn and then waits for a response on myScriptName.)
I'm sure this has to do with the combination of cross-env-shell with start-server-and-test, but I'm hoping there's a way around it where i can continue to use both libraries.
version: 1.14.0
platform: OSX
repro: I have the following script in my package.json
When I run
yarn test:integration:start, it always splits upnodeandserver.jsandcypressandrun, so it tries to launch the server usingnode, and then waits for a response atserver.js. I've tried every combination of escaped double quotes or single quotes I can think of to get it to read those strings together, but to no avail.expected behavior
start-server-and-testcan read my strings without splitting on whitespaceactual behavior
Each string is split on whitespace, leading to the script incorrectly parsing the command.
I also tried pulling out the strings into environment variables, but got the same result.
I also tried putting each command into its own npm script, and while that does actually work, it runs the commands with
npmrather thanyarn. If I add theyarnprefix, it splits those 2 words apart as well (e.g. starts the server usingyarnand then waits for a response onmyScriptName.)I'm sure this has to do with the combination of
cross-env-shellwithstart-server-and-test, but I'm hoping there's a way around it where i can continue to use both libraries.