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

fix(create-docusaurus): give a clearer message when installation failed #6095

Merged
merged 3 commits into from Dec 15, 2021

Conversation

Josh-Cena
Copy link
Collaborator

Motivation

Fix #6083.

Have you read the Contributing Guidelines on pull requests?

Yes

@Josh-Cena Josh-Cena added the pr: polish This PR adds a very minor behavior improvement that users will enjoy. label Dec 11, 2021
@netlify
Copy link

netlify bot commented Dec 11, 2021

✔️ [V2]

🔨 Explore the source changes: 2ddfe2a

🔍 Inspect the deploy log: https://app.netlify.com/sites/docusaurus-2/deploys/61b9e7563678f300072b200f

😎 Browse the preview: https://deploy-preview-6095--docusaurus-2.netlify.app

@github-actions
Copy link

github-actions bot commented Dec 11, 2021

⚡️ Lighthouse report for the changes in this PR:

Category Score
🟢 Performance 90
🟢 Accessibility 98
🟢 Best practices 100
🟢 SEO 100
🟢 PWA 95

Lighthouse ran on https://deploy-preview-6095--docusaurus-2.netlify.app/

@github-actions
Copy link

github-actions bot commented Dec 11, 2021

Size Change: 0 B

Total Size: 652 kB

ℹ️ View Unchanged
Filename Size
website/.docusaurus/globalData.json 37.8 kB
website/build/assets/css/styles.********.css 101 kB
website/build/assets/js/main.********.js 484 kB
website/build/index.html 29.3 kB

compressed-size-action

@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Dec 11, 2021
console.log(`The site directory has been created, and you can retry by typing:

${chalk.cyan('cd')} ${cdpath}
${chalk.cyan(`${pkgManager} install`)}`);
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it a good idea to print just yarn if pkgManager===yarn because yarn install doesn't make much sense.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yarn install makes sense. In fact I always prefer yarn install to yarn.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ohh! That's good then. I just read yarn instead of yarn install elsewhere, that's why I commented to ask. Awesome and sorry for nitpicking; was just looking at the PR code haha :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah, thanks for the review still!

Copy link
Contributor

Choose a reason for hiding this comment

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

Also, Josh; if there are similar beginner friendly issues; always feel free to assign and tag me! I would love to contribute too ;)

Copy link
Collaborator Author

@Josh-Cena Josh-Cena Dec 15, 2021

Choose a reason for hiding this comment

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

We are focused on shipping the rc release so the remaining few tasks in our todo list are getting increasingly harder :/ I'll continue to delegate easier issues to the community as soon as I can think of one, so just keep updated. e.g. #6058 would be interesting to work on, as long as you have solid React skills

throw err;
).code !== 0
) {
isInstallSuccessful = false;
Copy link
Collaborator

Choose a reason for hiding this comment

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

was wondering if we couldn't abort early here? throw or `exit(1)``

That could make the workflow simpler

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I don't want it to exit with 1. Installation is an optional step that the user can easily recover from. As long as we have a clear message, I think it's fine

Copy link
Collaborator

Choose a reason for hiding this comment

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

then what about exit 0 :D as long as you bail out early the code becomes simpler

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ah, I see what you mean😄Yeah, makes sense

Copy link
Collaborator

Choose a reason for hiding this comment

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

Thanks, :)

@slorber
Copy link
Collaborator

slorber commented Dec 15, 2021

LGTM 👍

@slorber slorber merged commit 649f18d into main Dec 15, 2021
@slorber slorber deleted the jc/throw-when-installation-fails branch December 15, 2021 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Signed Facebook CLA pr: polish This PR adds a very minor behavior improvement that users will enjoy.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

create-docusaurus show success message even when installation failed
4 participants