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

Should check if file is a directory rather than basename(fp) === 'package.json' #2

Closed
stevemao opened this issue Sep 3, 2015 · 2 comments

Comments

@stevemao
Copy link
Contributor

stevemao commented Sep 3, 2015

https://github.com/sindresorhus/read-pkg/blob/master/index.js#L13
If it's not a directory we shouldn't then append 'package.json'.
Mainly for tests https://github.com/npm/normalize-package-data/tree/master/test/fixtures. I have a bunch of package.jsons that are called something else.

@sindresorhus
Copy link
Owner

Sure, wanna do a PR?

@stevemao
Copy link
Contributor Author

stevemao commented Sep 3, 2015

Yup :)

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

No branches or pull requests

2 participants