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

[Suggestion] allow to skip the empty directory check when initializing #93

Closed
brennerm opened this issue Apr 4, 2020 · 4 comments · Fixed by #99
Closed

[Suggestion] allow to skip the empty directory check when initializing #93

brennerm opened this issue Apr 4, 2020 · 4 comments · Fixed by #99
Labels
feature-request New/Enhanced functionality wanted

Comments

@brennerm
Copy link
Contributor

brennerm commented Apr 4, 2020

Is your feature request related to a problem? Please describe.
On several occasions when executing cdk8s init I encountered the following error message: Cannot initialize a project in a non-empty directory. This is completely fine in most cases but e.g. when there's nothing else than a .git folder or anything cdk8s unrelated in the directory it would be very nice to skip this check.

Describe the solution you'd like
My proposal would be to add a generic --force or a more specific --skip-empty-check flag to the init command to allow skipping the is-directory-empty-check.

Describe alternatives you've considered
Right now I move all files out of the directory, execute cdk8s init and move the files back.

@brennerm brennerm added the feature-request New/Enhanced functionality wanted label Apr 4, 2020
@brennerm brennerm changed the title [Suggestion] allow to force init [Suggestion] allow to skip the empty directory check when initializing Apr 4, 2020
@brennerm
Copy link
Contributor Author

Hey @eladb, does the project team consider agreeing on this suggestion? If so please let me know whether my proposal sounds good. I'd like to work on this topic and prepare a PR.

@eladb
Copy link
Contributor

eladb commented Apr 10, 2020

Yes, I don’t have any objections. I think this needs to be implemented in sscaffs though

@brennerm
Copy link
Contributor Author

Ahh I see.

Just found out that aws-cdk had the same issue aws/aws-cdk#1758. Their solution was to ignore hidden files which would be fine for me as well. IMO it makes sense to make both tools behave similar in this regard.

@eladb
Copy link
Contributor

eladb commented Apr 10, 2020

Agreed. Ignoring hidden files is a nice way to deal with it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request New/Enhanced functionality wanted
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants