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

Exit Code on Failed Validation #378

Closed
HeyITGuyFixIt opened this issue Nov 24, 2021 · 1 comment · May be fixed by tbreeze-zengenti/react-starter#3
Closed

Exit Code on Failed Validation #378

HeyITGuyFixIt opened this issue Nov 24, 2021 · 1 comment · May be fixed by tbreeze-zengenti/react-starter#3

Comments

@HeyITGuyFixIt
Copy link

Is your feature request related to a problem? Please describe.
When usng the validate feature, if the xml is invalid, the error is caught and the error message is printed with console.log. This prevents my script from failing when the xml file I am generating is invalid.

Describe the solution you'd like
I would like for sitemap to return an exit code of 1 when the xml is invalid, instead of return an exit code of 0. You can add process.exitCode = 1 to exit with 1 whenever sitemap does exit, or you can make it exit right then and there with 1 by adding process.exit(1). This would placed right after the console.log that prints the caught error message.

@HeyITGuyFixIt HeyITGuyFixIt changed the title [Feature] Exit Code on Failed Validation Nov 24, 2021
@derduher
Copy link
Collaborator

The fix for this is merged and will be released in the next couple of days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants