From 90a2417fe2ec53e6ff0c2a8c80730dbf4f0a8d02 Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Mon, 29 Jun 2026 19:15:59 +0200 Subject: [PATCH] fix(git-node): add missing loop exit condition --- lib/promote_release.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/lib/promote_release.js b/lib/promote_release.js index 49b44ef2..fad389b2 100644 --- a/lib/promote_release.js +++ b/lib/promote_release.js @@ -539,16 +539,16 @@ export default class ReleasePromotion extends Session { { captureStdout: true, ignoreFailure: false }); const [commitTitle, ...modifiedFiles] = releaseCommitOnDefaultBranch.trim().split('\n'); await this.validateReleaseCommit(commitTitle); - if (modifiedFiles.some(file => !file.endsWith('.md'))) { - cli.warn( - 'Some modified files are not markdown, that\'s unusual. Consider amending the commit.' - ); - cli.info(`The list of modified files: ${modifiedFiles.map(f => `- ${f}`).join('\n')}`); - if (await cli.prompt('Ignore and continue anyway?', { - defaultAnswer: false - })) { - break; - } + if (!modifiedFiles.some(file => !file.endsWith('.md'))) break; + + cli.warn( + 'Some modified files are not markdown, that\'s unusual. Consider amending the commit.' + ); + cli.info(`The list of modified files: ${modifiedFiles.map(f => `- ${f}`).join('\n')}`); + if (await cli.prompt('Ignore and continue anyway?', { + defaultAnswer: false + })) { + break; } } }