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

Add --bail cli flag, exit with non-zero status if scanning results in error, fixes: #370 #371

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

vidhill
Copy link

@vidhill vidhill commented Jul 14, 2023

Feature request #370

When using the swagger-jsdoc cli in an npm script

If the scan fails the process currently exits with an exit code 0 which indicates success

When running on CICD for example,
I would like the job to fail so the process would need to exit with non-zero code

This PR adds a cli flag (--bail), when the flag is set exit with non-zero code if scanning fails

e.g.

npx swagger-jsdoc -d definition.js -o api-docs.json index.js --bail

If the scan fails, the script exits with code 1 otherwise it exits with 0 as normal

@stale
Copy link

stale bot commented Oct 16, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Oct 16, 2023
@daniloab daniloab added the pinned Issues that will not be automatically closed label Oct 17, 2023
@stale stale bot removed the wontfix label Oct 17, 2023
@vidhill
Copy link
Author

vidhill commented Jul 12, 2024

Is this change likely to get merged?

Do I need to do anything?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pinned Issues that will not be automatically closed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants