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

Enforce minimum Node version in CLI #454

Merged
merged 2 commits into from
Aug 14, 2016
Merged

Conversation

malept
Copy link
Member

@malept malept commented Aug 14, 2016

Have you read the section in CONTRIBUTING.md about pull requests?

Yes

Summarize your changes:

If Electron Packager's CLI is run with an old version of Node, it will give a SyntaxError which is not intuitive to people what that means. This change (based on a suggestion by @MarshallOfSound in #445 (comment)) gets rid of the SyntaxError, but tells the user exactly why the CLI will not run, before exiting with a non-zero status code. (Example output below.)

Are your changes appropriately documented?

Yes (prior to this PR existing):

Do your changes have sufficient test coverage?

No, but it's dependent on Node version, so I felt it wasn't worth doing extra work just to get code coverage for this feature. I tested manually with these instructions on Linux:

  1. Install nodeenv
  2. Run nodeenv -n 0.12.15 --prebuilt /tmp/n012
  3. Run source /tmp/n012/bin/activate
  4. Run cd /path/to/electron-packager && ./cli.js

Expected output:

CANNOT RUN WITH NODE 0.12.15
Electron Packager requires Node 4.0 or above.

Does the testsuite pass successfully on your local machine?

Yes

@malept malept added this to the 7.6.0 milestone Aug 14, 2016
@malept malept merged commit 4987fd2 into master Aug 14, 2016
@malept malept deleted the enforce-minimum-node-version branch August 14, 2016 18:14
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.

1 participant