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

version should exit nonzero instead of only printing to stderr and bailing #1308

Open
eckdanny opened this issue Feb 9, 2024 · 1 comment

Comments

@eckdanny
Copy link

eckdanny commented Feb 9, 2024

Affected Packages

@changesets/cli@<=2.27.1 i.e. this block

Problem

As a CLI user, I expect a nonzero exit status here. Esp in CI scenarios, where the errexit shellopt is nearly always on. The printed warning is helpful.

Proposed solution

Throw an ExitError instead

@eckdanny
Copy link
Author

eckdanny commented Feb 11, 2024

having just tuned up a new CI/CD pipeline with changesets at work, occurs to me this is probably a breaking change. Maintainers are prob more aware of ramifications than me.

Possible semver escape hatch: consider an --exit-code (like git diff) or --strict -like optional arg to maintain current behavior, but give us the option to fail-on-warn if that's what we want. Or consider is-ci-powered "strictness"

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

No branches or pull requests

1 participant