Skip to content

Support flake.nix and flake.lock as allowed files when initializing a project #4487

Closed
@atkrad

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

Metadata

Assignees

Labels

good first issueDenotes an issue ready for a new contributor, according to the "help wanted" guidelines.help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.kind/featureCategorizes issue or PR as related to a new feature.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions