Skip to content

Commit 776a114

Browse files
authored
Merge pull request agentstack-ai#162 from AgentOps-AI/exit-on-init-failure
exit on init failure
2 parents a9a375d + 1f30ed6 commit 776a114

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

agentstack/cli/cli.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,16 +46,13 @@ def init_project_builder(
4646
use_wizard: bool = False,
4747
):
4848
if not slug_name and not use_wizard:
49-
print(term_color("Project name is required. Use `agentstack init <project_name>`", 'red'))
50-
return
49+
raise Exception("Project name is required. Use `agentstack init <project_name>`")
5150

5251
if slug_name and not is_snake_case(slug_name):
53-
print(term_color("Project name must be snake case", 'red'))
54-
return
52+
raise Exception("Project slug name must be snake_case")
5553

5654
if template is not None and use_wizard:
57-
print(term_color("Template and wizard flags cannot be used together", 'red'))
58-
return
55+
raise Exception("Template and wizard flags cannot be used together")
5956

6057
template_data = None
6158
if template is not None:

0 commit comments

Comments
 (0)