Skip to content

Spaces in directory path fails scaffolding - Create api #5134

@The0mikkel

Description

@The0mikkel

What broke? What's expected?

When scaffolding an API with a path containing spaces, the create api command failed, while creating a mess of new directories.

Reproducing this issue

Do the following in a unix based system (I used Ubuntu)

mkdir -p "dir with spaces/operator"
cd "dir with spaces/operator"
kubebuilder init --domain com.example --repo demo
kubebuilder create api --group example --version v1 --kind Demo

Then say yes to Create Resource and Create Controller.

The scaffolding will then start but quickly fail with the following error:

ERROR CLI run failed error=error executing command: failed to create API: unable to run post-scaffold tasks of "base.go.kubebuilder.io/v4": error running make generate: error running "make": exit status 2

It creates a lot of directories, all over the place.

KubeBuilder (CLI) Version

4.9.0

PROJECT version

3

Plugin versions

Other versions

No response

Extra Labels

No response

Metadata

Metadata

Assignees

Labels

kind/bugCategorizes issue or PR as related to a bug.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions