From b10f598e66c8003377c2bdbaf5274ace8f4bf90a Mon Sep 17 00:00:00 2001 From: Kogasa Date: Sat, 17 Jun 2023 15:22:21 -0500 Subject: [PATCH] clarify "unsupported [database] version" error message When using an incompatible database version (e.g. from an old install of zoxide) this message is displayed frequently. The message should provide helpful information about the underlying problem and possible solution(s). --- src/db/mod.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/db/mod.rs b/src/db/mod.rs index 8eb9fc6..3b5ea54 100644 --- a/src/db/mod.rs +++ b/src/db/mod.rs @@ -226,7 +226,10 @@ impl Database { deserializer.deserialize(bytes_dirs).context("could not deserialize database")? } version => { - bail!("unsupported version (got {version}, supports {})", Self::VERSION) + bail!( + "unsupported database version (got {version}, supports {}), re-create the database", + Self::VERSION + ) } };