Skip to content

fix: skip empty post upgrade task - #45227

Open
oliverpool wants to merge 3 commits into
renovatebot:mainfrom
oliverpool:fix/skip-empty-post-upgrade-task
Open

fix: skip empty post upgrade task#45227
oliverpool wants to merge 3 commits into
renovatebot:mainfrom
oliverpool:fix/skip-empty-post-upgrade-task

Conversation

@oliverpool

@oliverpool oliverpool commented Aug 11, 2026

Copy link
Copy Markdown

Changes

Skip empty postUpgradeTasks.commands (after compilation).

Explanation

When using templates, the resulting postUpgradeTasks.commands can become empty.
In my case, I want to run the command only for a specific manager:

  "postUpgradeTasks": {
    "commands": [
      "{{#if (equals manager 'jsonata')}}lon modify {{{depName}}} --revision {{{ newDigest }}}{{/if}}"
    ],
    "fileFilters": [
      "lon.lock"
    ],
    "executionMode": "update"
  }

This currently fails for other managers (like cargo), with a message Post-upgrade command '' has not been added to the allowed list in allowedCommands.

Current workaround: use an {{else}}true condition and add ^true$ to the allowedCommands (skipping the command should be faster and easier to manage).

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):

Use of AI in replying to PR comments

Who answers review comments:

  • @oliverpool will read and reply directly. Name the account.
  • An agent will draft replies and @username will read them before they are posted. Name the account.
  • Nobody has explicitly committed to replying.

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 August 11, 2026 16:26
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