unjs / giget

✨ Download templates and git repositories with pleasure!
MIT License
446 stars 37 forks source link

Status message after cloning showing hyphen (-) instead of slash (/) #95

Closed TechAkayy closed 8 months ago

TechAkayy commented 1 year ago

Environment

Node: v18.12.1 Package: npx giget@latest

Reproduction

npx giget@latest gh:TechAkayy/icones

Describe the bug

image

Look closely at this screenshot:

Cloned repo - gh:TechAkayy/icones Status message - Successfully cloned TechAkayy-icones to TechAkayy-icones

Additional context

No response

Logs

No response

pi0 commented 11 months ago

Hi dear @TechAkayy. Actually it is an expected behavior we auto generate a heaman friendly name from full resolved repository. You can provide directory name like npx giget@latest gh:TechAkayy/icones icons or use a template registry.

I am closing issue but if you feel there is something to improve, please ping me to reopen.

TechAkayy commented 11 months ago

Hi @pi0

Yes, that's correct. But I raised this issue about showing the source repo's name correctly. So, I would have expected the displayed message message to be -

Successfully cloned TechAkayy/icones to TechAkayy-icones

instead of..

Successfully cloned TechAkayy-icones to TechAkayy-icones

Trivial one, what do you think.

pi0 commented 8 months ago

Hi. Checking back it again, it is actually correct behavior (well, kinda!).

Templates when resolved, will get a name. In case of git repositories, name is normalized with - to be stored in cache.

CLI output shows resolved name because the input source with / is already visible in CLI input by user!

You might make a custom CLI to change this behavior.

TechAkayy commented 8 months ago

Thanks @pi0 for the detailed reply 👍🏽