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

yarn global bin has difficulties with ~ in path #2877

Closed
creynders opened this issue Mar 9, 2017 · 3 comments
Closed

yarn global bin has difficulties with ~ in path #2877

creynders opened this issue Mar 9, 2017 · 3 comments

Comments

@creynders
Copy link

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

BUG

What is the current behavior?

If the global prefix is set to a path contain a tilde-character yarn global bin seems to treat it as dot-character, i.e. a relative path.

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

$ yarn config list
info npm config
{ prefix: '~/.npm-global' }
$ pwd
/Users/creynders/foo/bar/qux
$ yarn global bin
/Users/creynders/foo/bar/qux/~/.npm-global/bin

What is the expected behavior?

$ yarn config list
info npm config
{ prefix: '~/.npm-global' }
$ pwd
/Users/creynders/foo/bar/qux
$ yarn global bin
/Users/creynders/.npm-global/bin

Please mention your node.js, yarn and operating system version.

node: v6.9.5
yarn: 0.20.3
OS: OS X 10.12.3

Temporary fix
Use an absolute path for your prefix

$ npm config set prefix /Users/creynder/.npm-global
@josephsavona
Copy link

Just ran into this. When you notice the errantly created local ~ folder, the temptation is to try deleting it, which you have to be very careful about...

@Chocanto
Copy link

Chocanto commented May 4, 2017

I confirm this bug, this not only make it unusable but it create a false ~ folder. I was also tempted to enter rm -r ~ before taking me back ^^'

@BYK
Copy link
Member

BYK commented Oct 27, 2017

Fixed by #3576.

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

5 participants