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

Do not count .DS_Store as a file to disqualify a folder during prisma2 init with a Starter Kit #762

Closed
sdnts opened this issue Oct 16, 2019 · 2 comments
Assignees
Labels
kind/improvement An improvement to existing feature and code. topic: prisma init CLI: prisma init
Milestone

Comments

@sdnts
Copy link
Contributor

sdnts commented Oct 16, 2019

I gather that prisma2 init + Starter Kit only works with empty directories. However, macOS's Finder creates a hidden .DS_Store file that saves metadata about the directory itself (icon positions etc.). When this file is present, prisma2 init + Starter Kit fails with the following message:

Screenshot 2019-10-16 at 12 31 06

, which is technically correct, but I believe we should not count the existence of this .DS_Store file towards being a non-empty directory. I think we should either ignore it or delete it.

Steps to reproduce (only on macOS):

  1. Go to any folder, and create an abcd folder.
  2. Inside the abcd folder, create another folder, then delete it. (Make sure you do this in Finder, mkdir in Terminal will not create the .DS_Store file)
  3. Run ls -a in this abcd folder, and you should see the .DS_Store file.
  4. Try prisma2 init in the abcd folder.
@janpio janpio added kind/improvement An improvement to existing feature and code. topic: prisma init CLI: prisma init labels Oct 16, 2019
@sdnts
Copy link
Contributor Author

sdnts commented Oct 23, 2019

We can also possibly ignore a .git directory

@timsuchanek
Copy link
Contributor

Fixed in latest alpha.
You can try it out with npm i -g prisma2@alpha.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/improvement An improvement to existing feature and code. topic: prisma init CLI: prisma init
Projects
None yet
Development

No branches or pull requests

3 participants