Skip to content

Allow creating playground from default manifest#95

Open
sagikazarmark wants to merge 2 commits into
iximiuz:mainfrom
sagikazarmark:playground-create
Open

Allow creating playground from default manifest#95
sagikazarmark wants to merge 2 commits into
iximiuz:mainfrom
sagikazarmark:playground-create

Conversation

@sagikazarmark
Copy link
Copy Markdown
Contributor

When no manifest file is provided, use the builtin default manifest (using --base)

Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
@sagikazarmark
Copy link
Copy Markdown
Contributor Author

@iximiuz what do you think?

@iximiuz
Copy link
Copy Markdown
Owner

iximiuz commented Apr 10, 2026

What are the intended use cases? 🤔

@sagikazarmark
Copy link
Copy Markdown
Contributor Author

Replacing the following:

labctl playground manifest flexbox > manifest.yaml
# yq replace name and base
labctl playground create --file manifest.yaml my-playground

with

labctl playground create --base flexbox my-playground

@iximiuz
Copy link
Copy Markdown
Owner

iximiuz commented Apr 12, 2026

Ah, I see. Yep, let's merge it. I'd only try simplifying the ifs there - it's a bit too much of nested logic. Maybe extract the whole manifest reading into a function that can do early returns to avoid nested conditions?

By the way, --base can probably default to flexbox.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants