Skip to content

Commit 3f21218

Browse files
authored
Merge pull request #26 from 0xdabbad00/change_exit_status
Just use a 0 or 1 for the exit status, to avoid having a status over 255
2 parents 53d8a76 + a16ca09 commit 3f21218

3 files changed

Lines changed: 4 additions & 3 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ Notice that the severity of that finding has been changed from a `LOW` to a `MED
8888

8989
Now rename `test.json` to `testa.json` and rerun the command. You will no longer have any output, because we are filtering based on the filepath for `UNKNOWN_ACTION` and filtering for any filepaths that contain `testa.json` or `.py`.
9090

91-
You can also check the exit status with `echo $?` and see the exit status is 0 when there are no findings. The exit status is set to the number of findings (ex. 10 findings results in an exit status of 10).
91+
You can also check the exit status with `echo $?` and see the exit status is 0 when there are no findings. The exit status will be non-zero when there are findings.
9292

9393

9494

parliament/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""
22
This library is a linter for AWS IAM policies.
33
"""
4-
__version__ = "0.3.5"
4+
__version__ = "0.3.6"
55

66
import os
77
import json

parliament/cli.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,8 +177,9 @@ def main():
177177

178178
for finding in filtered_findings:
179179
print_finding(finding, args.minimal, args.json)
180+
180181
# There were findings, so return with a non-zero exit code
181-
exit(len(filtered_findings))
182+
exit(1)
182183

183184

184185
if __name__ == "__main__":

0 commit comments

Comments
 (0)