From 0a9b7b81bed5b069096481e04edf65cc91527f8f Mon Sep 17 00:00:00 2001 From: edraft Date: Sun, 19 Oct 2025 19:27:18 +0200 Subject: [PATCH] Fixed init command regarding name None --- src/cli/cpl/cli/command/structure/init.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cli/cpl/cli/command/structure/init.py b/src/cli/cpl/cli/command/structure/init.py index ee7c4d7f..2e946e72 100644 --- a/src/cli/cpl/cli/command/structure/init.py +++ b/src/cli/cpl/cli/command/structure/init.py @@ -30,7 +30,7 @@ def init(target: str, name: str): if target in ["workspace", "ws"]: workspace = Structure.init_workspace("./", name or click.prompt("Workspace name", default="my-workspace")) elif target in PROJECT_TYPES: - workspace = Structure.find_workspace_in_path(Path(name).parent) + workspace = Structure.find_workspace_in_path(Path(name or "./").parent, with_parents=True) project = Structure.init_project( "./", name or click.prompt("Project name", default=f"my-{target}"), target, workspace )