workers-sdk icon indicating copy to clipboard operation
workers-sdk copied to clipboard

🐛 BUG: `wrangler delete <name>` fails back to the current worker if it can't find the name

Open rozenmd opened this issue 1 year ago • 2 comments

Which Cloudflare product(s) does this pertain to?

Wrangler core

What version(s) of the tool(s) are you using?

3.19.0

What version of Node are you using?

18.16

What operating system are you using?

Mac

Describe the Bug

Spicy bug:

rozenmd@xxxxx d1-test % npx wrangler delete test
 ⛅️ wrangler 3.19.0
-------------------
? Are you sure you want to delete d1-test? This action cannot be undone. › (Y/n)

I meant to run npx wrangler d1 delete test, the prompt asking me to delete my current Worker (with a different name) surprised me.

I expected wrangler to reject/throw with "Worker does not exist" or similar.

Please provide a link to a minimal reproduction

No response

Please provide any relevant error logs

No response

rozenmd avatar Dec 12 '23 15:12 rozenmd