- const assetsSource = join(postSourcePath, internals.kAssetsDirectoryName);
-
- internals.debuglog(`Copying ${assetsSource} to ${assetsTarget}`);
- await internals.ncp(assetsSource, assetsTarget);
- }
- catch (error) {
- if (error.code === internals.kFileNotFoundError) {
- internals.debuglog(`Skipping ${i}`);
- continue;
+ if (entry.isDirectory()) {
+ await cp(sourceAsset, targetAsset, { recursive: true });
+ }
+ else {
+ await cp(sourceAsset, targetAsset);