Enforce that the updater is run from the root dir; it assumes data/ exists.

This commit is contained in:
Dustin Carlino 2021-05-15 11:49:42 -07:00
parent 913f7b770f
commit 56b16f8dae

View File

@ -13,6 +13,10 @@ const MD5_BUF_READ_SIZE: usize = 4096;
#[tokio::main]
async fn main() {
if !std::path::Path::new("data").exists() {
panic!("Your current directory doesn't have the data/ directory. Run from the git root: cd ../; cargo run --bin updater -- args");
}
let mut args = CmdArgs::new();
let version = args
.optional("--version")