Skip to content

sv create directory detection does not ignore . directories #114

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

Closed
manuel3108 opened this issue Oct 14, 2024 · 7 comments
Closed

sv create directory detection does not ignore . directories #114

manuel3108 opened this issue Oct 14, 2024 · 7 comments

Comments

@manuel3108
Copy link
Member

Create a new repo, clone it, cd into it's directory.
Run sv create.
It will say that directory is not empty, which technically is true because it contains a potentially hidden .git directory. I think that directories starting with a . should be completely ignored in this check.

Relates: svelte-add/svelte-add#285

@AdrianGonz97
Copy link
Member

AdrianGonz97 commented Oct 14, 2024

I wonder if this could be furthered improved by only scanning the directory for files/dirs that would be overwritten? for instance, if there's an existing src directory, then the warning prompt will be triggered

@manuel3108
Copy link
Member Author

I don't think this enhances anything for the user. Additionally I'm unaware of any other cli doing anything like this.

@AdrianGonz97
Copy link
Member

it enhances it such that the warning isn't triggered for anything besides files that would be overwritten. in other words, we wouldn't need special exceptions for . files or directories as this would encompass that

@benmccann
Copy link
Member

It could be very difficult to make it work with an API such as the one discussed in #85 (comment)

@AdrianGonz97
Copy link
Member

this would only be for create when creating a new project

@manuel3108
Copy link
Member Author

Seeing it from that way this could work

@manuel3108
Copy link
Member Author

I don't think overall this is worth the hustle. I think we should close this, now that #126 is merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants