Skip to content

Commit

Permalink
ValidateOnly now returns exitCode 1 when validation errors are found (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
tdawgy authored and amitguptagwl committed Apr 18, 2019
1 parent 758bf20 commit 5b4487f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ if (process.argv[2] === '--help' || process.argv[2] === '-h') {
}
} else if (validateOnly) {
output = parser.validate(xmlData);
process.exitCode = output === true ? 0 : 1;
} else {
output = JSON.stringify(parser.parse(xmlData, options), null, 4);
}
Expand Down

0 comments on commit 5b4487f

Please sign in to comment.