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 package.json scripts to be cross-platform #358

Merged

Conversation

TranquilMarmot
Copy link
Contributor

Specifying node_modules/bin was causing issues with these on Windows.

Also, the cypress tests were using export instead of cross-env which was also breaking on Windows.

@TranquilMarmot
Copy link
Contributor Author

Hmm it looks like doing i.e. cross-env CYPRESS_SANDBOX_URL=http://127.0.0.1:8888 doesn't work 🤔

@danielcaldas danielcaldas self-requested a review August 13, 2020 11:10
Copy link
Owner

@danielcaldas danielcaldas left a comment

Choose a reason for hiding this comment

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

Hey @TranquilMarmot thanks for the PR, you might need to add cross-env to the dev dependencies in order for the CI to install the dependency. It's probably working in your machine due to a global version of cross-env that you might have installed. Just npm install cross-env --save-dev should suffice. Cheers!

@TranquilMarmot
Copy link
Contributor Author

@danielcaldas cross-env is already a dependency and is used as part of npm run dev:

"cross-env": "5.2.1",

I wonder if cypress just isn't picking up the env var for some reason 🤔

@danielcaldas
Copy link
Owner

danielcaldas commented Aug 14, 2020

Oh, I think you might need to wrap the var with \"? Not really sure what it might be 🤔

cross-env CYPRESS_SANDBOX_URL=\"http://127.0.0.1:8888\"

@danielcaldas danielcaldas self-requested a review August 28, 2020 13:40
Copy link
Owner

@danielcaldas danielcaldas left a comment

Choose a reason for hiding this comment

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

Fixed

@danielcaldas danielcaldas merged commit 173caf3 into danielcaldas:master Aug 28, 2020
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.

2 participants