Skip to content

fix: ignore hidden directories in empty directory detection#126

Merged
benmccann merged 3 commits intomainfrom
fix/ignore-hidden-directories-in-empty-directory-detection
Oct 15, 2024
Merged

fix: ignore hidden directories in empty directory detection#126
benmccann merged 3 commits intomainfrom
fix/ignore-hidden-directories-in-empty-directory-detection

Conversation

@manuel3108
Copy link
Copy Markdown
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.

@changeset-bot
Copy link
Copy Markdown

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

@pkg-pr-new
Copy link
Copy Markdown

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

Comment thread packages/cli/commands/create.ts Outdated
@benmccann benmccann merged commit 4e64c9d into main Oct 15, 2024
@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