Closed brennerm closed 4 years ago
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.
Yes, I don’t have any objections. I think this needs to be implemented in sscaffs though
Ahh I see.
Just found out that aws-cdk had the same issue https://github.com/aws/aws-cdk/issues/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.
Agreed. Ignoring hidden files is a nice way to deal with it
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 theinit
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.