Skip to content

Commit 0ec1fbd

Browse files
authored
feat(cli): output file name when error happen to handling a file (#702)
1 parent 755bd68 commit 0ec1fbd

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/cli/src/dirCommand.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,10 @@ export const dirCommand: SvgrCommand = async (
146146
}
147147

148148
const dest = path.resolve(outDir as string, path.relative(root, filename))
149-
return write(filename, dest)
149+
return write(filename, dest).catch(err => {
150+
console.error('Failed to handle file: ', filename)
151+
throw err
152+
})
150153
}
151154

152155
await Promise.all(

0 commit comments

Comments
 (0)