aboutsummaryrefslogtreecommitdiff
path: root/planetwars-cli/src/commands/run_match.rs
diff options
context:
space:
mode:
authorIlion Beyst <ilion.beyst@gmail.com>2021-12-28 19:28:19 +0100
committerIlion Beyst <ilion.beyst@gmail.com>2021-12-28 19:28:19 +0100
commitee5af8d07625bfc7ad11b842b3941bb095aa6a6e (patch)
treeb1f21f06a6a45b4b36cfcfa50ea5bd16a3132670 /planetwars-cli/src/commands/run_match.rs
parent6d176ac99fb096034ff5406700a7921dab48c24f (diff)
downloadplanetwars.dev-ee5af8d07625bfc7ad11b842b3941bb095aa6a6e.tar.xz
planetwars.dev-ee5af8d07625bfc7ad11b842b3941bb095aa6a6e.zip
implement build command
Diffstat (limited to 'planetwars-cli/src/commands/run_match.rs')
-rw-r--r--planetwars-cli/src/commands/run_match.rs7
1 files changed, 6 insertions, 1 deletions
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(())
}
}