From 0f6c1b3856c33ab1c39a688da19a2651b42f660d Mon Sep 17 00:00:00 2001 From: Scott Lamb Date: Tue, 23 Nov 2021 10:41:07 -0800 Subject: [PATCH] use github URLs in doc pointers This is better particularly when the user is following the docker instructions and doesn't have a local checkout at all. It also is a rendered HTML view rather than raw markdown. It'd be nice to link to the exact release we're using, not tip of master. I didn't do this now because it'll likely take some work with build.rs to check if the user is on a tagged release or not. Fixes #180 --- server/db/db.rs | 13 ++++++++----- server/src/cmds/run.rs | 2 +- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/server/db/db.rs b/server/db/db.rs index a11c446..5f28c8a 100644 --- a/server/db/db.rs +++ b/server/db/db.rs @@ -2185,16 +2185,19 @@ fn get_boot_uuid() -> Result, Error> { pub(crate) fn check_schema_version(conn: &rusqlite::Connection) -> Result<(), Error> { let ver = get_schema_version(conn)?.ok_or_else(|| { format_err!( - "no such table: version. \ - If you are starting from an empty database, see README.md to \ - complete the installation. If you are starting from a database \ - that predates schema versioning, see guide/schema.md." + "no such table: version.\n\n\ + If you have created an empty database by hand, delete it and use `nvr init` \ + instead, as noted in the installation instructions: \ + \n\n\ + If you are starting from a database that predates schema versioning, see \ + ." ) })?; match ver.cmp(&EXPECTED_VERSION) { std::cmp::Ordering::Less => bail!( "Database schema version {} is too old (expected {}); \ - see upgrade instructions in guide/upgrade.md.", + see upgrade instructions in \ + .", ver, EXPECTED_VERSION ), diff --git a/server/src/cmds/run.rs b/server/src/cmds/run.rs index a414be0..26041e6 100644 --- a/server/src/cmds/run.rs +++ b/server/src/cmds/run.rs @@ -229,7 +229,7 @@ async fn inner(args: Args, shutdown_rx: base::shutdown::Receiver) -> Result