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

support for ~ (home dir) in cafile (and other directives accepting a file path) #2930

Closed
kevinv11n opened this issue Mar 16, 2017 · 0 comments

Comments

@kevinv11n
Copy link

Do you want to request a feature or report a bug?
Bug

What is the current behavior?
~ is not properly evaluated when used in the cafile directive in .npmrc

If the current behavior is a bug, please provide the steps to reproduce.

Consider the scenario of a private npm registry that uses a self-signed SSL certificate. A user's ~/.npmrc would look like this:

registry=https://internal-registry/...
cafile=~/custom-certs.pem

Running yarn install results in this error message: error Could not open cafile: ENOENT: no such file or directory, open '~/custom-certs.pem'

If you change the cafile directive to cafile=/users/kevin/custom-certs.pem then yarn install works fine.

What is the expected behavior?
Use of ~ in cafile should expand to the user's home directory. It should do the same expansion in other directives that accept file paths.

Please mention your node.js, yarn and operating system version.
node: v6.2.0
yarn: v0.21.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants