Fix issue when a file is skipped inside a directory

Signed-off-by: Manuel Cañete <mcaneteubeda@gmail.com>
This commit is contained in:
Manuel Cañete
2022-07-09 19:37:40 +02:00
parent 7d34991080
commit bc59e8833b
2 changed files with 9 additions and 0 deletions
@@ -226,6 +226,12 @@ describe('fetch:template', () => {
).resolves.toEqual(false);
});
it('skips empty filename inside directory', async () => {
await expect(
fs.pathExists(`${workspacePath}/target/subdir3/fileSkippedInsideDirectory.txt`),
).resolves.toEqual(false);
});
it('skips content of empty subdirectory', async () => {
await expect(
fs.pathExists(
@@ -217,6 +217,9 @@ export function createFetchTemplateAction(options: {
}
const outputPath = resolveSafeChildPath(outputDir, localOutputPath);
if (fs.existsSync(outputPath)) {
continue;
}
if (!renderContents && !extension) {
ctx.logger.info(