From b394f30fc1fa637cffc0aec7afa4e25c5597c304 Mon Sep 17 00:00:00 2001 From: Rhys Arkins <rhys@arkins.net> Date: Sat, 8 Jun 2024 09:23:17 +0200 Subject: [PATCH] fix: warn if empty allowedPostUpgradeCommands (#29538) --- .../update/branch/execute-post-upgrade-commands.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/workers/repository/update/branch/execute-post-upgrade-commands.ts b/lib/workers/repository/update/branch/execute-post-upgrade-commands.ts index a44f1c7906..fd4aa9d14b 100644 --- a/lib/workers/repository/update/branch/execute-post-upgrade-commands.ts +++ b/lib/workers/repository/update/branch/execute-post-upgrade-commands.ts @@ -168,11 +168,9 @@ export default async function executePostUpgradeCommands( config.updatedPackageFiles.length > 0) || (is.array(config.updatedArtifacts) && config.updatedArtifacts.length > 0); - if ( + if (!hasChangedFiles) { /* Only run post-upgrade tasks if there are changes to package files... */ - !hasChangedFiles || - is.emptyArray(GlobalConfig.get('allowedPostUpgradeCommands')) - ) { + logger.debug('No changes to package files, skipping post-upgrade tasks'); return null; } -- GitLab