Support flake.nix and flake.lock as allowed files when initializing a project #4487
Description
What do you want to happen?
When I attempt to initialize a new project, I encounter the following error:
kubebuilder init --domain example.com --repo example.com/example-operator
Error:
Error: failed to initialize project: unable to run pre-scaffold tasks of "base.go.kubebuilder.io/v4": target directory is not empty (only go.mod, go.sum, files and directories with the prefix ".", files with the suffix ".md" or capitalized files name are allowed); found existing file "flake.lock"
It seems that only specific files, such as go.mod
, go.sum
, or Markdown files, are accepted in the target directory. However, many developers use Nix to manage dependencies, which requires files like flake.nix
and flake.lock
to be present in the directory for dependency installation.
To improve compatibility, it would be a good idea to accept flake.nix
and flake.lock
as allowed files during project initialization.
Extra Labels
No response