-
-
Notifications
You must be signed in to change notification settings - Fork 360
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
do not infer cwd from pkgUp, if pkgUp walks all the way to / #180
Conversation
This almost seems like a pkgUp bug. Shouldn't it return null? |
@novemberborn @jamestalmage I have no I'm really confused because it feels like this should have always been broken, and |
It's a bug in |
This will be fixed with sindresorhus/find-up#4. |
[email protected] is out with @novemberborn's fix. Sorry about the trouble. |
do not infer cwd from pkgUp, if pkgUp walks all the way to /
@bcoe why merge this? |
@novemberborn I figured it was worth merging an explicit bump of
|
@bcoe ah sorry, hadn't checked the diff 😊 |
The library
pkgUp
is used to find the closest package.json, which nyc uses ascwd
.If
pkgUp
walks all the way to/
, it returns the stringpackage.json
. In this edge-case, we should not switch tocwd
to the path of the package.json found bypkgUp
.