From 631d0e923bd2954ddd0800452a31c6d2fa74c121 Mon Sep 17 00:00:00 2001 From: Tie Liu Date: Tue, 20 Jun 2023 14:38:28 +0800 Subject: [PATCH] use normal PATH as OS --- bin/daemon.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/bin/daemon.rs b/bin/daemon.rs index a480201..9ea8788 100644 --- a/bin/daemon.rs +++ b/bin/daemon.rs @@ -38,7 +38,7 @@ pub struct RtoConfig { pub elf_path: String, pub mode: String, pub libs: Vec, - pub PATH: Option>, + pub PATH: Option, #[serde(skip)] watch_paths: Vec, @@ -303,8 +303,10 @@ fn process_config(path: PathBuf) -> Option { return None; } }; - let confpaths_temp = conf.PATH.as_ref().map_or_else(Vec::new, |v| v.clone()); - let confpaths: Vec<&str> = confpaths_temp.iter().map(|s| s.as_str()).collect(); + + let confpaths_temp = conf.PATH.as_ref().map_or_else(String::new, |v| v.clone()); + let confpaths: Vec<&str> = confpaths_temp.split(':').collect(); + let rpaths = elf.rpaths; if let Some(paths_temp) = env::var_os("PATH") { let paths_str = paths_temp.to_string_lossy(); -- Gitee