edgedb-cli
edgedb-cli copied to clipboard
Check for instance before confirmation prompt on `instance delete`
$ edgedb instance destroy -I nonexistent_instance
Do you really want to delete instance "nonexistent_instance"? (type `Yes`)
> Yes
edgedb error: instance not found: instance not found
The problem with checking whether instance exists here is inconsistent. This command is designed to clean every remnant of the instance even if it was half-wiped before (i.e. interrupted destroy, manual file poking, filesystem failure, whatever). This is even more error-prone with systemctl
/launchctl
when user have poked with them somehow.
So even if instance is not listed in edgedb instance list
, some files could be deleted.
So I'm thinking of the command rm -rf non-existent
where it's not an error to delete a non-existing file. And trying to fix this is quite error prone so I'm not sure if it worth adding that implementation complexity.
Don't see many confused users so far. Let's keep it as is for now.