🐛 BUG: D1 export throws cryptic error when passed directory instead of file #7629
Labels
d1
Relating to D1
enhancement
New feature or request
quick win
Potentially easy/straightforward issue to tackle
Which Cloudflare product(s) does this pertain to?
D1
What versions are you using?
Wrangler 3.99.0
What operating system and version are you using?
Mac latest
Please provide a link to a minimal reproduction
No response
Describe the Bug
When you try to export a D1 DB, but you provide
--output
with a directory rather than a filename:npx wrangler@latest d1 export db-name --remote --output ./
...you get an error that is cryptic:
✘ [ERROR] EISDIR: illegal operation on a directory, open './'
This error is pretty easily googleable, but it still feels like we could do better — and actually validate that what was provided is a filename, not a filepath, and throw a more helpful and specific input validation error.
This seesm particularly important given that otherwise, we show this:
Which kind of suggests that this is a bug, an unknown/unhandled case.
Please provide any relevant error logs
No response
The text was updated successfully, but these errors were encountered: