@@ -236,7 +236,7 @@ export class Extractor {
236236 messageRouter . logWarning ( ConsoleMessageId . ApiReportNotCopied ,
237237 'You have changed the public API signature for this project.'
238238 + ` Please copy the file "${ actualApiReportShortPath } " to "${ expectedApiReportShortPath } ",`
239- + ` or else perform a local build (which does this automatically).`
239+ + ` or perform a local build (which does this automatically).`
240240 + ` See the Git repo documentation for more info.` ) ;
241241 } else {
242242 // For a local build, just copy the file automatically.
@@ -264,16 +264,11 @@ export class Extractor {
264264 if ( ! localBuild ) {
265265 // For a production build, issue a warning that will break the CI build.
266266 messageRouter . logWarning ( ConsoleMessageId . ApiReportNotCopied ,
267- 'You have changed the public API signature for this project .'
267+ 'The API report file is missing .'
268268 + ` Please copy the file "${ actualApiReportShortPath } " to "${ expectedApiReportShortPath } ",`
269- + ` or else perform a local build (which does this automatically).`
269+ + ` or perform a local build (which does this automatically).`
270270 + ` See the Git repo documentation for more info.` ) ;
271271 } else {
272- messageRouter . logWarning ( ConsoleMessageId . ApiReportCreated ,
273- 'The API report file was missing, so a new file was created. Please add this file to Git:\n'
274- + expectedApiReportPath
275- ) ;
276-
277272 const expectedApiReportFolder : string = path . dirname ( expectedApiReportPath ) ;
278273 if ( ! FileSystem . exists ( expectedApiReportFolder ) ) {
279274 messageRouter . logError ( ConsoleMessageId . ApiReportFolderMissing ,
@@ -284,6 +279,10 @@ export class Extractor {
284279 FileSystem . writeFile ( expectedApiReportPath , actualApiReportContent , {
285280 convertLineEndings : NewlineKind . CrLf
286281 } ) ;
282+ messageRouter . logWarning ( ConsoleMessageId . ApiReportCreated ,
283+ 'The API report file was missing, so a new file was created. Please add this file to Git:\n'
284+ + expectedApiReportPath
285+ ) ;
287286 }
288287 }
289288 }
0 commit comments