Skip to content

Commit 5abf0e1

Browse files
committed
fix: use std::env::join_paths for AXVISOR_VM_CONFIGS
1 parent 90c4d5e commit 5abf0e1

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

xtask/src/tbuld.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,10 @@ impl Context {
7878
}
7979

8080
if !vm_config_paths.is_empty() {
81-
let sep = if cfg!(target_os = "windows") { ";" } else { ":" };
82-
let value = vm_config_paths
83-
.iter()
84-
.map(|p| format!("{}", p.display()))
85-
.collect::<Vec<_>>()
86-
.join(&sep);
81+
let value = std::env::join_paths(&vm_config_paths)
82+
.map_err(|e| anyhow::anyhow!("Failed to join VM config paths: {}", e))?
83+
.to_string_lossy()
84+
.into_owned();
8785
cargo.env.insert("AXVISOR_VM_CONFIGS".to_string(), value);
8886
}
8987

0 commit comments

Comments
 (0)