Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running spectral with unknown flags gives exit code of 0 #1586

Closed
philipbjorge opened this issue Apr 28, 2021 · 0 comments · Fixed by #1620
Closed

Running spectral with unknown flags gives exit code of 0 #1586

philipbjorge opened this issue Apr 28, 2021 · 0 comments · Fixed by #1620
Assignees
Labels
enhancement New feature or request p/longterm triaged v6 Scheduled to be released in v6

Comments

@philipbjorge
Copy link

Describe the bug
When running the linter, if you pass it unknown arguments it does not run the linter and instead writes out help docs.
This behavior is fine but it's problematic because it returns an exit code of 0 - For the past 2 weeks, we erroneously thought the linter was running because it was giving a successful status code.

To Reproduce
npx @stoplight/spectral lint descriptions/v1/api.yaml -rip && echo "FAIL"

You will see the word FAIL printed to your console, indicating the status code was successful

Expected behavior
I expected spectral to return a non zero status code and my echo statement to not run

Environment (remove any that are not applicable):

  • Library version: 5.9.1
@philipbjorge philipbjorge added the t/bug Something isn't working label Apr 28, 2021
@P0lip P0lip self-assigned this May 11, 2021
@P0lip P0lip removed the triaged label May 11, 2021
@P0lip P0lip added v6 Scheduled to be released in v6 enhancement New feature or request and removed t/bug Something isn't working labels May 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request p/longterm triaged v6 Scheduled to be released in v6
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants