Skip to content

Commit

Permalink
Let komodo-show-version print to stdout
Browse files Browse the repository at this point in the history
Letting main() return a string will have it printed to stderr
  • Loading branch information
berland committed Feb 9, 2023
1 parent 24d946b commit d30f209
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions komodo/show_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,13 +171,14 @@ def parse_args(args: List[str]) -> argparse.Namespace:
return parser.parse_args(args)


def main() -> str:
def main() -> int:
"""
Run the CLI and return the result from get_version().
"""
args = parse_args(sys.argv[1:])
return get_version(args.package, manifest=args.manifest_file)
print(get_version(args.package, manifest=args.manifest_file))
return 0


if __name__ == "__main__":
print(main())
main()

0 comments on commit d30f209

Please sign in to comment.