-
-
Notifications
You must be signed in to change notification settings - Fork 41
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
Tolerate absolute filenames? #36
Comments
This is already fixed in #28. Feel free to use the fork until we merge it. :) That said, IMO passing absolute paths to I would recommend short-circuiting the logic to explicitly use the given filepath as-is if it is absolute, for clarity's sake, avoiding |
Let's document it. I think |
@sholladay Yes it looks like your PR will resolve this for us in nyc@15 (that'll be when we drop node.js 6). Do you want to add |
Sure, that's reasonable. But what if it doesn't exist at the given path? Do people expect us to immediately return |
Other than using If find-up doesn't find an absolute filename in Unrelated but for completeness of discussion, find-up does support finding relative filenames. For example you could have I've opened sholladay#1 to add tests to cover edge cases. |
👍
👍 |
requires another patch to @webextension-toolbox/webextension-toolbox due to default config file path not resolving with find-up (sindresorhus/find-up#36 (comment))
requires another patch to @webextension-toolbox/webextension-toolbox due to default config file path not resolving with find-up (sindresorhus/find-up#36 (comment))
nyc has gotten a report that
--nycrc-path
does not support absolute paths - true as we usefind-up
to find the requested configuration file. Currently if CWD is/home/coreyfarrell/test-project
and I runfindUp.sync('/home/coreyfarrell/nycrc.json', {cwd: process.cwd()})
, this will return/home/coreyfarrell/test-project/home/coreyfarrell/nycrc.json
. This would be fixed if find-up usedpath.resolve
instead ofpath.join
. Would you be open to this? I can post an implementation including tests.The text was updated successfully, but these errors were encountered: