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 nodejs and yarn checks #232

Merged
merged 1 commit into from
Apr 6, 2017
Merged

Conversation

aganov
Copy link
Contributor

@aganov aganov commented Apr 5, 2017

webpacker:check_node task is calculating nodejs version wrong

-> % bundle exec rake webpacker:check_node
Webpacker requires Node.js >= 6.4 and you are using v6.10.2
Please upgrade Node.js https://nodejs.org/en/download/

This PR replaces calculation to use Gem::Version instead of version.to_f. Also rails is using patched version of backticks which is not raising exception if the binary is not exists. More info can be found here: Object#` I've added a fix to webpacker:check_node and webpacker:check_yarn to raise Errno::ENOENT if the version check failed with blank value. I'm not sure if we have to raise and rescue in case of patched backticks in active_support, but I'm leaving it like this so it will work if the patch is removed.

@matthewd matthewd merged commit 7b83822 into rails:master Apr 6, 2017
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