Skip to content

Return the correct exit code in the Vercel command#13780

Merged
tknickman merged 1 commit intomainfrom
fix-help-exit-code
Aug 18, 2025
Merged

Return the correct exit code in the Vercel command#13780
tknickman merged 1 commit intomainfrom
fix-help-exit-code

Conversation

@swarnava
Copy link
Member

@swarnava swarnava commented Aug 18, 2025

Few Vercel commands exits with a status code of 2, making it look like something is wrong.

image

@swarnava swarnava requested a review from a team as a code owner August 18, 2025 08:42
@changeset-bot
Copy link

changeset-bot bot commented Aug 18, 2025

🦋 Changeset detected

Latest commit: 063bcab

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
vercel Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@tknickman tknickman merged commit 84eb049 into main Aug 18, 2025
178 checks passed
@tknickman tknickman deleted the fix-help-exit-code branch August 18, 2025 13:09
ijjk pushed a commit that referenced this pull request Aug 18, 2025
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## vercel@46.0.2

### Patch Changes

- feat(cli): add SSO re-authorization support to --future
([#13771](#13771))

- Return the correct exit code in the Vercel command
([#13780](#13780))

- Updated dependencies
\[[`fcf7791f1dae2967c09c09b78aedf00be5d25303`](fcf7791),
[`b9e399c69ebeb71d9150e8aa994294b0c2be8c9f`](b9e399c)]:
    -   @vercel/next@4.11.3

## @vercel/next@4.11.3

### Patch Changes

- Handle building for app router without internal pages entries
([#13704](#13704))

- Add action metadata routes
([#13775](#13775))

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
ergunsh added a commit that referenced this pull request Feb 25, 2026
Return exit code 0 instead of 2 when --help flag is used, aligning
with standard CLI conventions (git, npm, docker) and the root
`vercel --help` behavior.

This follows the same fix applied in #13780 and #14834 for other
commands.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
ergunsh added a commit that referenced this pull request Feb 26, 2026
Return exit code 0 instead of 2 when --help flag is used, aligning with
standard CLI conventions (git, npm, docker) and the root `vercel --help`
behavior.

This follows the same fix applied in #13780 and #14834 for other
commands.

<!-- VADE_RISK_START -->
> [!NOTE]
> Low Risk Change
>
> This PR changes the exit code from 2 to 0 when --help flag is used for
the metrics CLI command, which is a standard CLI convention fix with no
security implications.
> 
> - Exit code changed from 2 to 0 for --help flag in three places
> - Test updated to expect exit code 0 instead of 2
> - Changeset added documenting the patch
>
> <sup>Risk assessment for [commit
0fc2575](https://github.com/vercel/vercel/commit/0fc2575eff6fa3e4d02fa897b9a4fa8035d1a384).</sup>
<!-- VADE_RISK_END -->

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
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

Successfully merging this pull request may close these issues.

2 participants