Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 BUG: D1 export throws cryptic error when passed directory instead of file #7629

Open
irvinebroque opened this issue Dec 24, 2024 · 0 comments
Labels
bug Something that isn't working d1 Relating to D1

Comments

@irvinebroque
Copy link
Contributor

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:

If you think this is a bug then please create an issue at https://github.com/cloudflare/workers-sdk/issues/new/choose
✔ Would you like to report this error to Cloudflare? … yes

Which kind of suggests that this is a bug, an unknown/unhandled case.

Please provide any relevant error logs

No response

@irvinebroque irvinebroque added bug Something that isn't working d1 Relating to D1 labels Dec 24, 2024
@github-project-automation github-project-automation bot moved this to Untriaged in workers-sdk Dec 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something that isn't working d1 Relating to D1
Projects
Status: Untriaged
Development

No branches or pull requests

1 participant