Skip to content

Commit

Permalink
Add exit code for errors
Browse files Browse the repository at this point in the history
See issue #73
  • Loading branch information
Joe-Heffer-Shef authored and priv-kweihmann committed Nov 25, 2024
1 parent 85fc985 commit fe5b455
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions systemdlint/systemdlint/__main__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import sys

from systemdlint.cls.parser import Parser
from systemdlint.cls.runargs import ArgParser
from systemdlint.conf.getTests import getTests
Expand All @@ -22,8 +24,14 @@ def main():
_out.write(str(item) + "\n")
if isinstance(runargs.output, str):
_out.close()

# Set non-zero exit status code
if _errors:
sys.exit(1)

else:
getTests(runargs.files[0])


if __name__ == '__main__':
main()

0 comments on commit fe5b455

Please sign in to comment.