From ee5af8d07625bfc7ad11b842b3941bb095aa6a6e Mon Sep 17 00:00:00 2001 From: Ilion Beyst Date: Tue, 28 Dec 2021 19:28:19 +0100 Subject: implement build command --- planetwars-cli/src/commands/run_match.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'planetwars-cli/src/commands/run_match.rs') diff --git a/planetwars-cli/src/commands/run_match.rs b/planetwars-cli/src/commands/run_match.rs index 6341b31..868e87c 100644 --- a/planetwars-cli/src/commands/run_match.rs +++ b/planetwars-cli/src/commands/run_match.rs @@ -40,7 +40,12 @@ impl RunMatchCommand { match_runner::run_match(match_config).await; println!("match completed successfully"); // TODO: maybe print the match result as well? - println!("wrote match log to {}", log_path.to_str().unwrap()); + + let relative_path = match log_path.strip_prefix(&workspace.root_path) { + Ok(path) => path.to_str().unwrap(), + Err(_) => log_path.to_str().unwrap(), + }; + println!("wrote match log to {}", relative_path); Ok(()) } } -- cgit v1.2.3