diff --git a/src/package.ts b/src/package.ts index 0626b880..f858137e 100644 --- a/src/package.ts +++ b/src/package.ts @@ -984,11 +984,7 @@ export class ReadmeProcessor extends MarkdownProcessor { } override async processFile(file: IFile): Promise { - if (isInMemoryFile(file)) { - util.log.warn(`The provided readme file is in memory and will not be included in the VSIX.`); - return file; - } - file = { ...file, originalPath: file.localPath, path: 'extension/readme.md' }; + file = { ...file, originalPath: !isInMemoryFile(file) ? file.localPath : undefined, path: 'extension/readme.md' }; return await super.processFile(file, file.path); } @@ -1016,7 +1012,7 @@ export class ChangelogProcessor extends MarkdownProcessor { util.log.warn(`The provided changelog file is in memory and will not be included in the VSIX.`); return file; } - file = { ...file, originalPath: file.localPath, path: 'extension/changelog.md' }; + file = { ...file, originalPath: !isInMemoryFile(file) ? file.localPath : undefined, path: 'extension/changelog.md' }; return await super.processFile(file, file.path); }