-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
chore(remix-dev/cli): simplify validateNewProjectPath
in create
command
#2695
Conversation
Hi @XiNiHa, Welcome, and thank you for contributing to Remix! Before we consider your pull request, we ask that you sign our Contributor License Agreement (CLA). We require this only once. You may review the CLA and sign it by adding your name to contributors.yml. Once the CLA is signed, the If you have already signed the CLA and received this response in error, or if you have any questions, please contact us at hello@remix.run. Thanks! - The Remix team |
Thank you for signing the Contributor License Agreement. Let's get this merged! 🥳 |
@XiNiHa Code changes go against |
2f07eeb
to
c4e529a
Compare
Not sure if I did it right or not, but tried to do what you've requested |
c4e529a
to
a57625a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@XiNiHa I just looked into your PR and you're indeed removing dead code.
I however think we should only move the return
into the contents.length
check, as that's what would be intended I think.
@MichaelDeBoey The diff is a bit confusing, but the code does the same thing (I just moved the |
@XiNiHa You also removed one of the possible errors. |
@MichaelDeBoey It was impossible to hit that error. The condition ( |
@XiNiHa The second one was indeed never hit, but I'm quite certain that was never @kentcdodds' intention in #2655. Since that wasn't his intention, the |
@MichaelDeBoey I guess this is what you want, but I'm still not sure if it's a good idea to error when users try to create a project on an empty directory. |
validateNewProjectPath
in create
command
Let's ask @kentcdodds what his intentions were to be certain of it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
Removes a dead branch found inside the CLI code for validating project directories.