Skip to content

Commit 2d1085f

Browse files
authored
fix(git-node): add missing exit loop condition (#1101)
1 parent bf990ac commit 2d1085f

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

‎lib/promote_release.js‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -539,16 +539,16 @@ export default class ReleasePromotion extends Session {
539539
{ captureStdout: true, ignoreFailure: false });
540540
const [commitTitle, ...modifiedFiles] = releaseCommitOnDefaultBranch.trim().split('\n');
541541
await this.validateReleaseCommit(commitTitle);
542-
if (modifiedFiles.some(file => !file.endsWith('.md'))) {
543-
cli.warn(
544-
'Some modified files are not markdown, that\'s unusual. Consider amending the commit.'
545-
);
546-
cli.info(`The list of modified files: ${modifiedFiles.map(f => `- ${f}`).join('\n')}`);
547-
if (await cli.prompt('Ignore and continue anyway?', {
548-
defaultAnswer: false
549-
})) {
550-
break;
551-
}
542+
if (!modifiedFiles.some(file => !file.endsWith('.md'))) break;
543+
544+
cli.warn(
545+
'Some modified files are not markdown, that\'s unusual. Consider amending the commit.'
546+
);
547+
cli.info(`The list of modified files: ${modifiedFiles.map(f => `- ${f}`).join('\n')}`);
548+
if (await cli.prompt('Ignore and continue anyway?', {
549+
defaultAnswer: false
550+
})) {
551+
break;
552552
}
553553
}
554554
}

0 commit comments

Comments
 (0)