Skip to content

Commit 2b0d9a3

Browse files
authored
Merge pull request #57 from victormlg/no-check-return-0
cfengine format: Exit with 0 when successfully reformatted
2 parents 9329cb0 + 199f2f6 commit 2b0d9a3

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/cfengine_cli/commands.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,9 @@ def format(names, line_length, check) -> int:
9090
if os.path.isdir(name):
9191
ret |= _format_dirname(name, line_length, check)
9292
continue
93-
return ret
93+
if check:
94+
return ret
95+
return 0
9496

9597

9698
def _lint(files, strict) -> int:

0 commit comments

Comments
 (0)