Skip to content

Commit

Permalink
feat(cli): output file name when error happen to handling a file (gre…
Browse files Browse the repository at this point in the history
  • Loading branch information
meowtec authored Apr 14, 2022
1 parent 755bd68 commit 0ec1fbd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/cli/src/dirCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,10 @@ export const dirCommand: SvgrCommand = async (
}

const dest = path.resolve(outDir as string, path.relative(root, filename))
return write(filename, dest)
return write(filename, dest).catch(err => {
console.error('Failed to handle file: ', filename)
throw err
})
}

await Promise.all(
Expand Down

0 comments on commit 0ec1fbd

Please sign in to comment.