Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exit on init failure #162

Merged
merged 2 commits into from
Jan 6, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions agentstack/cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,13 @@ def init_project_builder(
use_wizard: bool = False,
):
if not slug_name and not use_wizard:
print(term_color("Project name is required. Use `agentstack init <project_name>`", 'red'))
return
raise Exception("Project name is required. Use `agentstack init <project_name>`")

if slug_name and not is_snake_case(slug_name):
print(term_color("Project name must be snake case", 'red'))
return
raise Exception("Project slug name must be snake_case")

if template is not None and use_wizard:
print(term_color("Template and wizard flags cannot be used together", 'red'))
return
raise Exception("Template and wizard flags cannot be used together")

template_data = None
if template is not None:
Expand Down
Loading