You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Percy Agent exec command basically wraps another command to smartly start/stop a Percy build. We currently use spawn to run the command they pass from the CLI, but this doesn't quite work as nicely on Windows. Given this command on a unix machine:
$ percy exec -- cypress run
It would have to be modified to run on Windows:
$ percy exec -- cypress.cmd run
Possible fix
It would be nice to explore something like shelljs to move us away from using spawn and managing these complexities ourself. Cypress uses execa: https://www.npmjs.com/package/execa
The text was updated successfully, but these errors were encountered:
This PR introduces cross platform spawning of commands. Will close#174.
The problem is Windows users need to use the `exec` command like this:
```
$ percy exec -- cypress.cmd run
```
If they don't, we can't spawn their original test command. What's happening is nodes `spawn` ignores windows `PATHEXT` which is kinda like `$PATH` & that means `spawn` only works on Windows for `.exe` files. See:
- nodejs/node-v0.x-archive#2318
- bcoe/awesome-cross-platform-nodejs#26
Tested here: https://github.com/percy/example-percy-cypress/compare/rd/test-cross-platform
The first commit uses `cross_spawn` and successfully starts Cypress. The second commit uses `0.4.0` of agent and fails to start Cypress.
The problem
The Percy Agent
exec
command basically wraps another command to smartly start/stop a Percy build. We currently usespawn
to run the command they pass from the CLI, but this doesn't quite work as nicely on Windows. Given this command on a unix machine:$ percy exec -- cypress run
It would have to be modified to run on Windows:
$ percy exec -- cypress.cmd run
Possible fix
It would be nice to explore something like shelljs to move us away from using spawn and managing these complexities ourself. Cypress uses execa: https://www.npmjs.com/package/execa
The text was updated successfully, but these errors were encountered: