Skip to content

fix(cli): avoid printing logs on --version/--help - #42183

Merged
viceice merged 1 commit into
renovatebot:mainfrom
felipecrs:parse-early-flags
Mar 27, 2026
Merged

fix(cli): avoid printing logs on --version/--help#42183
viceice merged 1 commit into
renovatebot:mainfrom
felipecrs:parse-early-flags

Conversation

@felipecrs

@felipecrs felipecrs commented Mar 27, 2026

Copy link
Copy Markdown
Contributor

Changes

This PR fixes a bug in the Renovate CLI where it was printing logs to stdout before handling the --version and --help flags, which caused the output to be unparsable by tools that expect only the version or help text.

## BEFORE ##
$ renovate --version
 INFO: Renovate started
       "renovateVersion": "0.0.0-semantic-release"
 WARN: Config validation errors found
       "configType": "config.js",
       "errors": [
         {
           "topic": "Configuration Error",
           "message": "Invalid configuration option: reportFormatting"
         }
       ]
0.0.0-semantic-release

## AFTER ##
$ renovatte --version
0.0.0-semantic-release

Context

Please select one of the following:

  • This closes an existing Issue, Closes: #
  • This doesn't close an Issue, but I accept the risk that this PR may be closed if maintainers disagree with its opening or implementation

AI assistance disclosure

Did you use AI tools to create any part of this pull request?

Please select one option and, if yes, briefly describe how AI was used (e.g., code, tests, docs) and which tool(s) you used.

  • No — I did not use AI for this contribution.
  • Yes — minimal assistance (e.g., IDE autocomplete, small code completions, grammar fixes).
  • Yes — substantive assistance (AI-generated non‑trivial portions of code, tests, or documentation).
  • Yes — other (please describe):

Documentation (please check one with an [x])

  • I have updated the documentation, or
  • No documentation update is required

How I've tested my work (please select one)

I have verified these changes via:

  • Code inspection only, or
  • Newly added/modified unit tests, or
  • No unit tests, but ran on a real repository, or
  • Both unit tests + ran on a real repository

The public repository:

@github-actions
github-actions Bot requested a review from viceice March 27, 2026 02:22
@viceice
viceice added this pull request to the merge queue Mar 27, 2026
Merged via the queue into renovatebot:main with commit 93985c3 Mar 27, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 43.93.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@felipecrs
felipecrs deleted the parse-early-flags branch March 27, 2026 14:43
@jamietanna jamietanna added the regression Issue about a regression bug, or the PR caused it label Apr 8, 2026
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators May 9, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

regression Issue about a regression bug, or the PR caused it

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants