Skip to content

Commit

Permalink
Return system exit code when running as module (#729)
Browse files Browse the repository at this point in the history
  • Loading branch information
mungojam authored Jan 25, 2024
1 parent b691090 commit d7e7fa3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion terraform_compliance/__main__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import sys

from .main import cli

cli()
sys.exit(cli())
3 changes: 2 additions & 1 deletion terraform_compliance/main.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import sys
import os
import shutil
import atexit
Expand Down Expand Up @@ -159,4 +160,4 @@ def cli(arghandling=ArgHandling(), argparser=ArgumentParser(prog=__app_name__,


if __name__ == '__main__':
cli()
sys.exit(cli())

0 comments on commit d7e7fa3

Please sign in to comment.