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 yarn run on window #4031

Merged
merged 1 commit into from
Jul 27, 2017
Merged

Fix yarn run on window #4031

merged 1 commit into from
Jul 27, 2017

Conversation

Volune
Copy link
Contributor

@Volune Volune commented Jul 27, 2017

Summary

Fix for #3773

Yarn run no longer works on windows with executables not mentioned in package.json/scripts

Test plan

I think we don't have automated tests for this case, it's OS specific and the fix relies on the shell option of child_process.spawn, so we cannot use mock to reliably test this issue.
(Any idea welcomed)

I ran manual tests on Windows 10 and a linux VM.
We should get more manual tests from the community before merging.

@BYK
Copy link
Member

BYK commented Jul 27, 2017

shell option is added in Node 5 and we need to support Node 4 for some more. For this reason, we can't go with the current solution. That said the code you removed was trying to mimic the shell: true behavior as documented in Node docs.

I think the main issue is with getting a full path or something on Windows so we can look there.

Copy link
Member

@BYK BYK left a comment

Choose a reason for hiding this comment

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

Rejecting due to shell not being available on Node 4.

@BYK BYK self-assigned this Jul 27, 2017
@Volune
Copy link
Contributor Author

Volune commented Jul 27, 2017

shell is in Node 4 documentation

I just tested with node 4.8.4 to confirm, it worked.

@BYK
Copy link
Member

BYK commented Jul 27, 2017

Oh, wow. Apologies. I looked at the latest docs and it says "v5.7.0 | The shell option is supported now." in the history part. I was also curious why our Node 4 builds didn't fail :D

This means we may use this in one more place.

@BYK BYK merged commit 99d09ca into yarnpkg:master Jul 27, 2017
@Vanuan
Copy link

Vanuan commented Sep 11, 2017

Looks like it was introduced in 4.8, since it fails in 4.7
Couldn't find any information about node requirement. Looks like it's the time to upgrade to 6.x

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.

3 participants