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

Passing the content of package.json as a command line argument could cause problems #57

Closed
etiktin opened this issue Sep 23, 2015 · 1 comment · Fixed by #58
Closed

Comments

@etiktin
Copy link

etiktin commented Sep 23, 2015

In the check method we pass the options object as a command line argument to check.js (see relevant line here). This means we pass the entire content of package.json as a command line argument (at least if the user followed the examples and didn't pass a custom pkg object). This is a potential problem, since certain platforms have a limit to the maximum length of the command line string (at least Windows does). So it can cause issues with really big package.json files. I think it would be better, if we update options.pkg (in the UpdateNotifier constructor) to contain just the relevant keys (name and version), so this will never become an issue.

@sindresorhus
Copy link
Owner

PR welcome

etiktin pushed a commit to etiktin/update-notifier that referenced this issue Sep 24, 2015
We rewrite `options.pkg` to hold only the information we need (name and
version). So when we call node with check.js we no longer pass the
entire content of package.json as a command line argument.

This resolves sindresorhus#57.
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 a pull request may close this issue.

2 participants