Skip to content
This repository was archived by the owner on Apr 6, 2023. It is now read-only.
/frameworkPublic archive

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

Merged
pi0 merged 5 commits into
nuxt:mainfrom
harlan-zw:fix/nuxi-init-template-advice
Jun 1, 2022
Merged

refactor(nuxi): provide better advice on failing clone#5155
pi0 merged 5 commits into
nuxt:mainfrom
harlan-zw:fix/nuxi-init-template-advice

Conversation

@harlan-zw

@harlan-zwharlan-zw commented May 26, 2022

Copy link
Copy Markdown
Collaborator

🔗 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

netlifyBot commented May 26, 2022

Copy link
Copy Markdown

Deploy Preview for nuxt3-docs canceled.

NameLink
🔨 Latest commit0ae4546
🔍 Latest deploy loghttps://app.netlify.com/sites/nuxt3-docs/deploys/62970a47c9320e0008f5c146

Comment threadpackages/nuxi/src/commands/init.ts Outdated
Co-authored-by: Daniel Roe <daniel@roe.dev>
Comment threadpackages/nuxi/src/commands/init.ts Outdated
@pi0

pi0 commented May 31, 2022

Copy link
Copy Markdown
Member

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

@harlan-zw

harlan-zw commented Jun 1, 2022

Copy link
Copy Markdown
CollaboratorAuthor

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.

Comment threadpackages/nuxi/src/commands/init.ts Outdated
@pi0pi0 changed the title fix(nuxi): provide better advice on failing clonerefactor(nuxi): provide better advice on failing cloneJun 1, 2022
pi0
pi0 approved these changes Jun 1, 2022
@pi0
pi0 merged commit c1f728e into nuxt:mainJun 1, 2022
@pi0pi0 mentioned this pull request Jun 10, 2022
Sign up for freeto 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.

4 participants

@harlan-zw@pi0@danielroe@DamianGlowala