summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormo8it <mo8it@proton.me>2024-04-17 23:37:31 +0200
committermo8it <mo8it@proton.me>2024-04-17 23:37:31 +0200
commit634e17a5abdd5b03740cfb5ab690e2b8762cf0c3 (patch)
treee6bf9e2de4bf10b5e56c14aae5441af99b3c882c
parent2f810a4da67233716ad93e00afff6e8b260f4807 (diff)
Fix tests
-rw-r--r--src/exercise.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/exercise.rs b/src/exercise.rs
index 60a65bb..bed247e 100644
--- a/src/exercise.rs
+++ b/src/exercise.rs
@@ -3,6 +3,7 @@ use crossterm::style::{style, StyledContent, Stylize};
use std::{
fmt::{self, Display, Formatter},
fs,
+ path::Path,
process::{Command, Output},
};
@@ -51,7 +52,7 @@ impl Exercise {
cmd.arg(command);
// A hack to make `cargo run` work when developing Rustlings.
- if DEVELOPING_OFFICIAL_RUSTLINGS {
+ if DEVELOPING_OFFICIAL_RUSTLINGS && Path::new("tests").exists() {
cmd.arg("--manifest-path").arg("dev/Cargo.toml");
}