fix: copyAssets() for destination_dir (#414)

This commit is contained in:
Andreas Linde 2020-07-25 12:36:43 +02:00 committed by GitHub
parent 0b4686e3a6
commit 674c2318ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -22,6 +22,10 @@ export async function copyAssets(publishDir: string, destDir: string): Promise<v
}
const filePublishPath = path.join(publishDir, file);
const fileDestPath = path.join(destDir, file);
const destPath = path.dirname(fileDestPath);
if (fs.existsSync(destPath) === false) {
await createDir(destPath);
}
await io.cp(filePublishPath, fileDestPath, copyOpts);
core.info(`[INFO] copy ${file}`);
}