Skip to content

Commit a0408fe

Browse files
committed
📦✨ Add exit code return value to cyclopts CLI command
1 parent d96f370 commit a0408fe

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

‎project_name/src/{{package_name}}/{% if cli_framework == 'cyclopts' %}cli.py{% endif %}.jinja‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def do_something(
1818
/,
1919
*,
2020
code: Annotated[str, Parameter(alias="-c")] = "CODE",
21-
) -> None:
21+
) -> int:
2222
"""Do something.
2323

2424
Parameters
@@ -29,3 +29,4 @@ def do_something(
2929
The code to use
3030
"""
3131
print(target, code)
32+
return 0

0 commit comments

Comments
 (0)