Closed mattmazzola closed 5 years ago
Hey Matt! Thanks for opening an issue, I'm going to give this a whirl on my Windows machine today to see if I can uncover what's going on here.
Alright, what is going on here is really subtle. Could you give this a try and see if it works for you?
npx percy exec -- cypress.cmd run --spec "cypress/integration/*"
That worked for me locally and it's what we have to do in our node scripts with example apps to support windows: https://github.com/percy/example-percy-cypress/pull/23/files#diff-5768af5deda587912dcade757b171d20R8
Sorry it took so long to follow up.
I confirmed that using cypress.cmd
instead of cypress
worked / does not produce the error.
Although can you explain why/how this change works?
I thought the cypress
command was using the commands exposed by the cypress
package and am not sure how adding .cmd
would have an affect. I'm assume something to do with the way --exec
parameter is written?
Going to close this one up. We released a new version of both this SDK & the underlying SDK (@percy/agent
) that removes the need to specify .cmd
for Windows: https://github.com/percy/percy-agent/pull/175
What's happening is nodes spawn ignores windows PATHEXT which is kinda like $PATH & that means spawn only works on Windows for .exe files. There's a little more information in the PR linked above.
Executing the command
npx percy exec -- cypress run --spec "cypress/integration/*"
fails on when running locally on Windows but runs successfully on CircleCI linux VM so that's why I'm guessing it's OS dependent.Output:
Versions:
Windows 10 Pro 10.0.17763 Build 17763