cli icon indicating copy to clipboard operation
cli copied to clipboard

validate command returns 0 exit code when validation error occurs

Open andrewshawcare opened this issue 2 years ago • 3 comments

Describe the bug

It was expected that when a validation error occurs when running the validate command, a non-zero exit code would be used. Instead, it returns 0.

How to Reproduce

> touch asyncapi.yml ; npx @asyncapi/cli validate asyncapi.yml ; echo $? ; rm asyncapi.yml
ValidationError: Document can't be null or falsey.
0

Expected behavior

A non-zero error code would be used.

andrewshawcare avatar May 18 '22 15:05 andrewshawcare

Welcome to AsyncAPI. Thanks a lot for reporting your first issue. Please check out our contributors guide and the instructions about a basic recommended setup useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.

github-actions[bot] avatar May 18 '22 15:05 github-actions[bot]

@peter-rr would you like to have a look at this one? It looks easy to solve :)

fmvilas avatar May 18 '22 15:05 fmvilas

@fmvilas Sure! This command is already familiar to me, so let's go for it 💪

peter-rr avatar May 18 '22 19:05 peter-rr

Hey @peter-rr ! Not sure if you got the chance to get around this :)

TamimiGitHub avatar Sep 08 '22 04:09 TamimiGitHub

@TamimiGitHub PR is almost merged 😉 https://github.com/asyncapi/cli/pull/288

derberg avatar Sep 22 '22 12:09 derberg

:tada: This issue has been resolved in version 0.24.1 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

asyncapi-bot avatar Sep 27 '22 14:09 asyncapi-bot