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

Warn when installing Yarn globally via Yarn itself #2495

Closed
Daniel15 opened this issue Jan 19, 2017 · 4 comments
Closed

Warn when installing Yarn globally via Yarn itself #2495

Daniel15 opened this issue Jan 19, 2017 · 4 comments

Comments

@Daniel15
Copy link
Member

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

What is the current behavior?
yarn global add yarn works

What is the expected behavior?
It should disallow it, or at least warn. By definition, installing Yarn via Yarn will result in you having two separate versions of Yarn installed at the same time. This can cause all sorts of weird issues (for example, see #2480, and also #2015 and #2371). It also has all the same drawbacks as installing Yarn via npm (documented on the Yarn site at https://yarnpkg.com/en/docs/install#alternatives-tab)

@ljharb
Copy link

ljharb commented Jan 19, 2017

What if a project actually has yarn as a dependency? Shouldn't this be permitted?

@ljharb
Copy link

ljharb commented Jan 19, 2017

If you're only talking about installing it as a global, then ignore my comment :-)

@Daniel15
Copy link
Member Author

Good point @ljharb! I think that should be fine, it's just installing globally that's problematic

@Daniel15 Daniel15 changed the title Warn when installing Yarn via Yarn Disallow Yarn to be installed globally via Yarn itself Jan 19, 2017
@Daniel15 Daniel15 changed the title Disallow Yarn to be installed globally via Yarn itself Warn when installing Yarn globally via Yarn itself Jan 19, 2017
mnsn added a commit to mnsn/yarn that referenced this issue Jan 28, 2017
mnsn added a commit to mnsn/yarn that referenced this issue Feb 15, 2017
mnsn added a commit to mnsn/yarn that referenced this issue Feb 18, 2017
mnsn added a commit to mnsn/yarn that referenced this issue Feb 18, 2017
# This is the 1st commit message:
add warning from issue yarnpkg#2495

# This is the commit message yarnpkg#2:

fix comments of Deniel15

# This is the commit message yarnpkg#3:

remove spaces

# This is the commit message yarnpkg#4:

fix spaces

# This is the commit message yarnpkg#5:

Drop `diff`. (yarnpkg#2592)

# This is the commit message yarnpkg#6:

Remove empty lines

# This is the commit message yarnpkg#7:

Replace `user-home` with `os.homedir`. (yarnpkg#2635)

* Replace `user-home` with `os.homedir`.

* Replace `os.homedir` with `user-home-dir`.

* Fix use `require('user-home-dir').default`.

# This is the commit message yarnpkg#8:

add space that were removed
mnsn added a commit to mnsn/yarn that referenced this issue Feb 18, 2017
fix comments of Deniel15

remove spaces

fix spaces

Drop `diff`. (yarnpkg#2592)

Remove empty lines

Replace `user-home` with `os.homedir`. (yarnpkg#2635)

* Replace `user-home` with `os.homedir`.

* Replace `os.homedir` with `user-home-dir`.

* Fix use `require('user-home-dir').default`.

add space that were removed

marge with master
mnsn added a commit to mnsn/yarn that referenced this issue Feb 18, 2017
mnsn added a commit to mnsn/yarn that referenced this issue Feb 18, 2017
# This is the 1st commit message:
add warning from issue yarnpkg#2495

# This is the commit message yarnpkg#2:

fix comments of Deniel15

# This is the commit message yarnpkg#3:

remove spaces

# This is the commit message yarnpkg#4:

fix spaces

# This is the commit message yarnpkg#5:

Drop `diff`. (yarnpkg#2592)

# This is the commit message yarnpkg#6:

Remove empty lines

# This is the commit message yarnpkg#7:

Replace `user-home` with `os.homedir`. (yarnpkg#2635)

* Replace `user-home` with `os.homedir`.

* Replace `os.homedir` with `user-home-dir`.

* Fix use `require('user-home-dir').default`.

# This is the commit message yarnpkg#8:

add space that were removed
mnsn added a commit to mnsn/yarn that referenced this issue Feb 18, 2017
mnsn added a commit to mnsn/yarn that referenced this issue Feb 18, 2017
add warning from issue yarnpkg#2495

fix comments of Deniel15

remove spaces

fix spaces

Drop `diff`. (yarnpkg#2592)

Remove empty lines

Replace `user-home` with `os.homedir`. (yarnpkg#2635)

* Replace `user-home` with `os.homedir`.

* Replace `os.homedir` with `user-home-dir`.

* Fix use `require('user-home-dir').default`.

add space that were removed
mnsn added a commit to mnsn/yarn that referenced this issue Feb 18, 2017
mnsn added a commit to mnsn/yarn that referenced this issue Feb 18, 2017
mnsn added a commit to mnsn/yarn that referenced this issue Feb 18, 2017
mnsn added a commit to mnsn/yarn that referenced this issue Feb 18, 2017
mnsn added a commit to mnsn/yarn that referenced this issue Feb 18, 2017
mnsn added a commit to mnsn/yarn that referenced this issue Feb 18, 2017
Fix duplicate in en.js

Fix en.js linting

fix linting

add warning from issue yarnpkg#2495

fix issue yarnpkg#2495

fix spacing
mnsn added a commit to mnsn/yarn that referenced this issue Feb 19, 2017
mnsn added a commit to mnsn/yarn that referenced this issue Feb 19, 2017
@samjacobclift
Copy link
Contributor

Created a new PR based on the original PR from mnsn, made sure the linting looked good. It has latest master in it too so CI should all be good. We can close my PR if you like and we can wait for mnsn to finish his one, I don't mind 😄

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