Skip to content

Commit

Permalink
Rust: use Path to join paths
Browse files Browse the repository at this point in the history
  • Loading branch information
ibc committed Oct 20, 2023
1 parent 87f683c commit 8381be7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions worker/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ fn main() {
{
if !std::path::Path::new("worker/out/msys/bin/make.exe").exists() {
let python = if env::var("PYTHON").is_ok() {
env::var("PYTHON").unwrap().to_string()
env::var("PYTHON").unwrap()
} else if Command::new("where")
.arg("python3")
.status()
Expand All @@ -92,10 +92,10 @@ fn main() {
};

let worker_abs_path = env::current_dir().unwrap();
let dir = format!("{}\\out\\msys", worker_abs_path.display());
let dir = Path::new(&worker_abs_path).join("out/msys");

if !Command::new(python)
.arg("scripts\\getmake.py --dir {}", dir)
.arg("scripts\\getmake.py --dir {}", dir.display())
.status()
.expect("Failed to start")
.success()
Expand Down

0 comments on commit 8381be7

Please sign in to comment.