updated logic for onboard function not ask for to overwrite workspace since the logic already ensures nothing will be overwritten. Added onboard command tests and removed tests from gitignore
This commit is contained in:
@@ -177,18 +177,12 @@ def onboard():
|
||||
# Create workspace
|
||||
workspace = get_workspace_path()
|
||||
|
||||
create_templates = True
|
||||
if workspace.exists():
|
||||
console.print(f"[yellow]Workspace already exists at {workspace}[/yellow]")
|
||||
if not typer.confirm("Create missing default templates? (will not overwrite existing files)"):
|
||||
create_templates = False
|
||||
else:
|
||||
if not workspace.exists():
|
||||
workspace.mkdir(parents=True, exist_ok=True)
|
||||
console.print(f"[green]✓[/green] Created workspace at {workspace}")
|
||||
|
||||
# Create default bootstrap files
|
||||
if create_templates:
|
||||
_create_workspace_templates(workspace)
|
||||
_create_workspace_templates(workspace)
|
||||
|
||||
console.print(f"\n{__logo__} nanobot is ready!")
|
||||
console.print("\nNext steps:")
|
||||
|
||||
Reference in New Issue
Block a user