Skip to content

Commit e4108cc

Browse files
committed
Exit with nonzero exit status on grammar
1 parent 45ebef9 commit e4108cc

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎language_tool/__main__.py‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,8 @@ def main():
108108
lang_tool.disabled.update(args.disable)
109109
lang_tool.enabled.update(args.enable)
110110

111+
status = 0
112+
111113
if args.api:
112114
print(lang_tool._check_api(text).decode("utf-8"))
113115
elif args.apply:
@@ -117,6 +119,9 @@ def main():
117119
for n, match in enumerate(lang_tool.check(text)):
118120
print("{}.) {}".format(n + 1, match))
119121
print()
122+
status = 2
123+
124+
return status
120125

121126

122127
if __name__ == "__main__":

0 commit comments

Comments
 (0)