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

SwiftPlate fails if there are other files in the directory #50

Open
BalestraPatrick opened this issue Apr 8, 2017 · 3 comments
Open

Comments

@BalestraPatrick
Copy link

BalestraPatrick commented Apr 8, 2017

Hey John!

I tried to generate my first SwiftPlate project today 🎉
I cd'ed into my Desktop and then run swiftplate. I have other files in my Desktop and the script failed with the following error.
screen shot 2017-04-08 at 7 06 41 pm

I expected it to create a new folder with my project name. I think you didn't consider the case where I would like to generate a project in an existing directory with other files. Or maybe it's just that if there are files without standard text encoding (in my case a Sketch file) in the current directory, the script fails.

I expected it to work like Xcode -> New -> Project does. A brand new folder with the project name is created in the chosen directory.

@JohnSundell
Copy link
Owner

Hi @BalestraPatrick!

Yeah, SwiftPlate makes the assumption that you're generating a brand new project in an empty folder. Just mkdir MyProject && cd MyProject && swiftplate and you'll be good to go 👍

@BalestraPatrick
Copy link
Author

That's what I thought. Is there a way to make it fail more gracefully if SwiftPlate tries to read a file with a text encoding that can't be determined?

@superlopuh
Copy link

I'm going to add this here, even though it's a somewhat different issue, but I recon ought not to fail on an existing gitignore.

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

No branches or pull requests

3 participants