Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Introduce cross-spawn for cross platform commands #175

Merged
merged 1 commit into from Apr 30, 2019

Conversation

Robdel12
Copy link
Contributor

What is this?

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:

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.

Needs a little testing but I believe this will make all of our windows
`percy exec -- mvn.cmd test` type deals go away 🔥
@Robdel12 Robdel12 requested a review from djones April 30, 2019 21:04
Copy link
Contributor

@djones djones left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🍍 LGTM

@Robdel12 Robdel12 merged commit f9bc817 into master Apr 30, 2019
@Robdel12 Robdel12 deleted the rd/cross-platform-spawn branch April 30, 2019 21:17
djones pushed a commit that referenced this pull request Apr 30, 2019
## [0.4.1](v0.4.0...v0.4.1) (2019-04-30)

### Bug Fixes

* Introduce cross-spawn for cross platform commands ([#175](#175)) ([f9bc817](f9bc817)), closes [#174](#174)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ensure cross platform capability for exec CLI command
2 participants