-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Comments
What if a project actually has yarn as a dependency? Shouldn't this be permitted? |
If you're only talking about installing it as a global, then ignore my comment :-) |
Good point @ljharb! I think that should be fine, it's just installing globally that's problematic |
# 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
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
# 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
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
Fix duplicate in en.js Fix en.js linting fix linting add warning from issue yarnpkg#2495 fix issue yarnpkg#2495 fix spacing
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 😄 |
Do you want to request a feature or report a bug?
Enhancement
What is the current behavior?
yarn global add yarn
worksWhat 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)
The text was updated successfully, but these errors were encountered: