Skip to content

fix: ignore hidden directories in empty directory detection #126

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

Merged

Conversation

manuel3108
Copy link
Member

Relates #114 (not closes)

This only ignores the hidden directory. This is a quick win we can get up and ready before summit. We can always re-iterate that thing later on.

Copy link

changeset-bot bot commented Oct 15, 2024

🦋 Changeset detected

Latest commit: c715409

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
sv Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

pkg-pr-new bot commented Oct 15, 2024

Open in Stackblitz

pnpm add https://pkg.pr.new/sveltejs/cli/sv@126

commit: c715409

@Conduitry
Copy link
Member

Are there other hidden directories that we'd actually want to work this way, or is it really just .git? If there are other . directories or files present in a directory, who knows what's going on with it. I don't think it necessarily feels safe to just assume we're good to go without warning the user.

@benmccann
Copy link
Member

Personally, I don't see a strong need to change anything here. I just tested and all it did was prompted me:

Directory not empty. Continue?

Perhaps that's because my workflow doesn't involve creating a new repo and then running sv create. I would do it in the other order, which I think is what GitHub encourages

Screenshot from 2024-10-15 10-13-17

But I'm not opposed to ignoring .git in this check if folks would like

@manuel3108
Copy link
Member Author

Sure, we could just limit it to .git instead of ., as that's probably most used hidden directory on my computer.

Since this already came up in svelte-add and not many people knew about this tool at all, I'd assume this will come up here in a matter of days.

@benmccann benmccann merged commit 4e64c9d into main Oct 15, 2024
5 checks passed
@benmccann benmccann deleted the fix/ignore-hidden-directories-in-empty-directory-detection branch October 15, 2024 18:21
@github-actions github-actions bot mentioned this pull request Oct 15, 2024
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

Successfully merging this pull request may close these issues.

3 participants