sindresorhus / global-directory

Get the directory of globally installed packages and binaries
MIT License
75 stars 10 forks source link

if `~/.npmrc` has `prefix=~/.npm-global` the path solved incorrectly #21

Open yaquawa opened 3 years ago

yaquawa commented 3 years ago

How to reproduce

Adding the following to ~/.npmrc

prefix=~/.npm-global

global-dirs won't parse the ~ as home directory but as a literal string ~, it should parse it as os.homedir().

sindresorhus commented 3 years ago

Note to self: We can use https://github.com/sindresorhus/untildify for this.