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

add warning from issue #2495 #2577

Closed
wants to merge 3 commits into from
Closed

add warning from issue #2495 #2577

wants to merge 3 commits into from

Conversation

mnsn
Copy link

@mnsn mnsn commented Jan 28, 2017

Summary

as request in issue #2495 we should warn user when installing yarn globally using yarn, I have added a warning massage in the right place
Test plan
no test required

refusingDownloadGitWithoutCommit: 'Refusing to download the git repo $0 over plain git without a commit hash',
refusingDownloadHTTPWithoutCommit: 'Refusing to download the git repo $0 over HTTP without a commit hash',
refusingDownloadHTTPSWithoutCommit: 'Refusing to download the git repo $0 over HTTPS without a commit hash - possible certificate error?',

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please revert all the unnecessary changes, such as these spaces? In general, the Facebook coding style (which is somewhat used in the Yarn codebase too) is to trim all trailing whitespace from every line, so blank lines like these should be totally blank.

@@ -257,6 +256,7 @@ const messages = {
optionalDepNotInstalled: 'Optional dependency $0 not installed',
packageWrongVersion: '$0 is wrong version: expected $1, got $2',
packageDontSatisfy: '$0 doesn\'t satisfy found match of $1',
packageContainsYarnAsGlobal: 'installing Yarn via Yarn will result in you having two separate versions of Yarn installed at the same time.',
Copy link
Member

@Daniel15 Daniel15 Jan 29, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe also mention that it's not recommended, and to upgrade Yarn by following the instructions at https://yarnpkg.com/en/docs/install?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK so the full text will be:
installing Yarn via Yarn will result in you having two separate versions of Yarn installed at the same time, which is not recommended. To update Yarn please follow https://yarnpkg.com/en/docs/install

@mnsn
Copy link
Author

mnsn commented Jan 29, 2017

Hi @Daniel15 thank you for your review I've added the spaces and changed the message.

Copy link
Member

@bestander bestander left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for making changes, just a couple nits to fix and it is ready to merge

@@ -178,7 +178,11 @@ const {run, setFlags: _setFlags} = buildSubCommands('global', {
await updateCwd(config);

const updateBins = await initUpdateBins(config, reporter, flags);


Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: a few whitespaces got into this line


if (args.includes('yarn')) {
reporter.warn(reporter.lang('packageContainsYarnAsGlobal'));

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: this empty line not needed here

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @bestander , I removed the empty line

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't see it :)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry did it on my master now it's in


if (args.includes('yarn')) {
reporter.warn(reporter.lang('packageContainsYarnAsGlobal'));

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one more space

@bestander
Copy link
Member

Just one more space is unnecessary and could you rebase please?
CI had some stability fixes recently

@mnsn mnsn force-pushed the issue-2495 branch 5 times, most recently from 47c393b to 1130b3d Compare February 19, 2017 08:03
@bestander
Copy link
Member

Fixed in #2926

@bestander bestander closed this Mar 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants