Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

refactor(nuxi): provide better advice on failing clone #5155

Merged
merged 5 commits into from
Jun 1, 2022
Merged

refactor(nuxi): provide better advice on failing clone #5155

merged 5 commits into from
Jun 1, 2022

Conversation

harlan-zw
Copy link
Collaborator

@harlan-zw harlan-zw commented May 26, 2022

πŸ”— Linked issue

see #923 & #1052

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

The issue was identified when using nuxi init, I modified the arguments incorrectly and got an error that wasn't helpful.

image

The PR #923 introduced a try/catch for degit cloning, it correctly showed when a user required git if they didn't have it installed.

The switch to tiged #1052 changed what was being caught. Tiged works without git, it will download the tarball if git isn't available. So the error message is actually catching when the repo isn't valid.

The output will now look like this:

image

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@netlify
Copy link

netlify bot commented May 26, 2022

βœ… Deploy Preview for nuxt3-docs canceled.

Name Link
πŸ”¨ Latest commit 0ae4546
πŸ” Latest deploy log https://app.netlify.com/sites/nuxt3-docs/deploys/62970a47c9320e0008f5c146

Co-authored-by: Daniel Roe <daniel@roe.dev>
@pi0
Copy link
Member

pi0 commented May 31, 2022

Thanks for the changes! I believe we still need an additional hint for checking git being installed since it makes same error.

@harlan-zw
Copy link
Collaborator Author

harlan-zw commented Jun 1, 2022

Thanks for the changes! I believe we still need an additional hint for checking git being installed since it makes same error.

You were right on that, my bad. The testing I did locally was giving me a false positive on the git not being installed.

I've replicated it on stackblitz and the same catch is thrown for git being missing, so I've updated the message to include the original git hint.

@pi0 pi0 changed the title fix(nuxi): provide better advice on failing clone refactor(nuxi): provide better advice on failing clone Jun 1, 2022
@pi0 pi0 merged commit c1f728e into nuxt:main Jun 1, 2022
@pi0 pi0 mentioned this pull request Jun 10, 2022
@danielroe danielroe added the 3.x label Jan 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants