Skip to content
This repository has been archived by the owner on Apr 24, 2023. It is now read-only.

Commit

Permalink
Allow boolean return values for clr commands to be reflected as retur…
Browse files Browse the repository at this point in the history
…n codes. (#32)

* Allow boolean return values for clr commands to be reflected as return codes.
  • Loading branch information
mpcusack-color authored Oct 1, 2021
1 parent 6873a40 commit b7a1d3d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions clr/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ def main(argv=None):
result = namespace.command_callables[cmd_name](
*bound_args.args, **bound_args.kwargs
)
# Support exit codes.
if type(result) == int:
# Support exit codes. This supports int and bool return values.
if isinstance(result, (int, bool)):
# print(f"Result: {result}", file=sys.stderr)
sys.exit(result)
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

setup(
name="clr",
version="0.3.14",
version="0.3.15",
description="A command line tool for executing custom python scripts.",
author="Color",
author_email="dev@getcolor.com",
Expand Down

0 comments on commit b7a1d3d

Please sign in to comment.