edgedb-cli
edgedb-cli copied to clipboard
Improve handling of currupted portable edgedb-server binaries
In some weird cases, the portable distribution of edgedb-server might get corrupted. One possible way is interruption of the download/unpacking or interference of anti-virus software.
We had one such case reported here: https://discord.com/channels/841451783728529451/1270461080765993031
$ edgedb server install
edgedb error: error installing EdgeDB
Caused by: metadata error for "/home/edgedb/.local/share/edgedb/portable/5.6"
Caused by: cannot read "/home/edgedb/.local/share/edgedb/portable/5.6/install_info.json"
Caused by: EOF while parsing a value at line 1 column 0
In such scenarios, I suggest that the CLI displays the following message:
Error: corrupted installation of edgedb-server version 5.6
Do you want to remove this installation? [y/N]
If confirmed, the cli should then perform an uninstall.
Additionally, when the install is corrupted, it cannot be uninstalled:
$ edgedb server uninstall 5.6
[2024-08-07T19:18:31Z WARN edgedb::portable::local] Skipping "/home/edgedb/.local/share/edgedb/portable/5.6": cannot read "/home/edgedb/.local/share/edgedb/portable/5.6/install_info.json": EOF while parsing a value at line 1 column 0
Nothing to uninstall.
... which is a bug and should be fixed.