Skip to content

Commit

Permalink
feat(cli): output file name when error happen to handling a file (#702)
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

1 comment on commit 0ec1fbd

@vercel
Copy link

@vercel vercel bot commented on 0ec1fbd Apr 14, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

svgr – ./

svgr-git-main-gregberge.vercel.app
svgr-gregberge.vercel.app
api.react-svgr.com

Please sign in to comment.