Add non-zero exit code when
bad yamls are found instead of returning zero in that case.
This commit is contained in:
parent
e5011eeb34
commit
50084fe4ed
@ -9,6 +9,7 @@ import yaml
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
bads = 0
|
||||
for fn in sys.argv[1:]:
|
||||
sys.stdout.write("%s" % (fn))
|
||||
try:
|
||||
@ -18,3 +19,8 @@ if __name__ == "__main__":
|
||||
sys.stdout.write(" - ok\n")
|
||||
except Exception, e:
|
||||
sys.stdout.write(" - bad (%s)\n" % (e))
|
||||
bads += 1
|
||||
if bads > 0:
|
||||
sys.exit(1)
|
||||
else:
|
||||
sys.exit(0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user