diff --git a/src/dev/generate_release_note.ts b/src/dev/generate_release_note.ts index 0d0d7b06f945..b002711f151e 100644 --- a/src/dev/generate_release_note.ts +++ b/src/dev/generate_release_note.ts @@ -29,9 +29,7 @@ function addContentAfterUnreleased(path: string, newContent: string): void { newContent + fileContent.slice(endOfLineIndex + 1); } else { - // eslint-disable-next-line no-console - console.warn('End of line for "Unreleased" section not found.'); - return; + throw new Error('End of line for "Unreleased" section not found.'); } } else { throw new Error("'## [Unreleased]' not found in the file.");