diff --git a/Cargo.toml b/Cargo.toml index 36f4436..0b5c192 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "judge" -version = "2.3.4" +version = "2.3.5" edition = "2021" authors = ["Philip Barlow"] description = "Tool for an in house code challenge server" diff --git a/src/config.rs b/src/config.rs index 40f6d0e..08e63b3 100644 --- a/src/config.rs +++ b/src/config.rs @@ -308,10 +308,6 @@ impl WriteConfig { }; } "-n" => { - let user = whoami::username(); - if user != "root" { - return Err("-n has been deprecated. Do not use anymore.".into()); - } name = Some( args.get(i + 1) .ok_or("-n must provide a string")? diff --git a/src/main.rs b/src/main.rs index 56b2b68..9ae1a33 100644 --- a/src/main.rs +++ b/src/main.rs @@ -36,13 +36,16 @@ fn main() -> Result<(), Box> { let config = match config::RunMode::from_args(&args) { Ok(config) => config, - Err(_) => match menu::Menu::run(None) { - Ok(config) => config, - Err(e) => { - error!("Failed to establish run mode: {}", e); - return Ok(()); + Err(e) => { + log::debug!("Failed to establish run mode: {}", e); + match menu::Menu::run(None) { + Ok(config) => config, + Err(e) => { + error!("Failed to establish run mode: {}", e); + return Ok(()); + } } - }, + } }; debug!("Config: {:?}", config);