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

create astro -- --template passing non-existent folder arg. #6275

Closed
1 task
liruifengv opened this issue Feb 17, 2023 · 5 comments
Closed
1 task

create astro -- --template passing non-existent folder arg. #6275

liruifengv opened this issue Feb 17, 2023 · 5 comments
Labels
- P2: nice to have Not breaking anything but nice to have (priority)

Comments

@liruifengv
Copy link
Member

What version of astro are you using?

0.0.0

Are you using an SSR adapter? If so, which one?

None

What package manager are you using?

npm

What operating system are you using?

Mac

Describe the Bug

Use npm create astro@latest test-project -- --template empty passing non-existent folder arg.

Show template copied but the project is empty.

Expectation: Throw a 404 error.

This appears to be the result of an upstream repository https://github.com/unjs/giget

Link to Minimal Reproducible Example

None

Participation

  • I am willing to submit a pull request for this issue.
@liruifengv liruifengv changed the title create-astro -- --template passing non-existent folder arg. create astro -- --template passing non-existent folder arg. Feb 17, 2023
@MoustaphaDev

This comment was marked as outdated.

@MoustaphaDev MoustaphaDev added the needs response Issue needs response from OP label Feb 17, 2023
@Princesseuh
Copy link
Member

Not sure what I'm getting wrong, but running the same exact command give me a 404
image

That's a 400, you're hitting #6276

@Princesseuh Princesseuh removed the needs response Issue needs response from OP label Feb 17, 2023
@MoustaphaDev
Copy link
Member

MoustaphaDev commented Feb 17, 2023

Ah I can't read now 🤦‍♂️, good catch

@liruifengv
Copy link
Member Author

Yes. I can still reproduce the question.

I read the source code of the upstream repository and it seems to be based on the HTTP code 404 returned by GitHub.

But GitHub doesn't return 404 for non-existent directories of the repository.

I don't know~

@MoustaphaDev MoustaphaDev added the - P2: nice to have Not breaking anything but nice to have (priority) label Mar 10, 2023
@natemoo-re
Copy link
Member

This has already been fixed in a more recent version of create-astro!

@natemoo-re natemoo-re closed this as not planned Won't fix, can't repro, duplicate, stale Aug 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
- P2: nice to have Not breaking anything but nice to have (priority)
Projects
None yet
Development

No branches or pull requests

4 participants