Skip to content

Commit 5b4487f

Browse files
tdawgyamitguptagwl
authored andcommitted
ValidateOnly now returns exitCode 1 when validation errors are found (NaturalIntelligence#156)
1 parent 758bf20 commit 5b4487f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

cli.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ if (process.argv[2] === '--help' || process.argv[2] === '-h') {
5959
}
6060
} else if (validateOnly) {
6161
output = parser.validate(xmlData);
62+
process.exitCode = output === true ? 0 : 1;
6263
} else {
6364
output = JSON.stringify(parser.parse(xmlData, options), null, 4);
6465
}

0 commit comments

Comments
 (0)