Skip to content

Commit d91df00

Browse files
committed
properly distinc between validation and linting error
1 parent 95fd6a6 commit d91df00

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lint.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,7 @@ const command = async (specFile, cmd) => {
8585

8686
validator.validate(spec, buildValidatorOptions(skip, verbose), (err, _options) => {
8787
const { context, warnings } = _options || err.options;
88-
89-
if (err && typeof _options !== 'undefined') {
88+
if (err && err.options.valid === false) {
9089
console.error(colors.red + 'Specification schema is invalid.' + colors.reset);
9190
console.error(formatSchemaError(err, context));
9291
process.exit(1);

0 commit comments

Comments
 (0)