Skip to content

Commit 89827c8

Browse files
committed
added error printing
1 parent bad24c5 commit 89827c8

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

  • packages/nexrender-action-lottie/src

packages/nexrender-action-lottie/src/index.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,14 @@ const copy = (srcDir, dstDir) => {
3333
try {
3434
fs.mkdirSync(dst);
3535
} catch(e) {
36-
console.log('[action-lottie][copy] could\'t create directory: ' + dst);
36+
console.log('[action-lottie][copy] could\'t create directory: ' + dst + ' ' + e.message);
3737
}
3838
results = results.concat(copy(src, dst));
3939
} else {
4040
try {
4141
fs.writeFileSync(dst, fs.readFileSync(src));
4242
} catch(e) {
43-
console.log('[action-lottie][copy] could\'t copy file: ' + dst);
43+
console.log('[action-lottie][copy] could\'t copy file: ' + dst + ' ' + e.message);
4444
}
4545
results.push(src);
4646
}
@@ -65,7 +65,10 @@ module.exports = async (job, settings, { params = {} }) => {
6565
console.log(fs.readdirSync(path.join(__dirname, "..", "lib", "jsx")))
6666

6767
// copy recursively all files from the lib folder to the job.workpath
68-
copy(path.join(__dirname, "..", "lib"), path.join(job.workpath, "lib"));
68+
copy(
69+
path.resolve(path.join(__dirname, "..", "lib")),
70+
path.resolve(path.join(job.workpath, "lib"))
71+
);
6972

7073
// add lottie prerender finish script
7174
settings.logger.log(`[${job.uid}] [action-lottie] adding lottie prerender finish script`);

0 commit comments

Comments
 (0)