Skip to content

Commit

Permalink
more info on find_runtime_path
Browse files Browse the repository at this point in the history
  • Loading branch information
martinjrobins committed Nov 13, 2023
1 parent 46cec00 commit 98971b0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ pub fn find_runtime_path(libraries: &[&str] ) -> Result<String> {
let emsdk_lib_paths = vec![emsdk_lib.as_str()];
let lib_path_env = env::var("LIBRARY_PATH").unwrap_or("".to_owned());
let library_paths = lib_path_env.split(":").collect::<Vec<_>>();
for &path in emsdk_lib_paths.iter().chain(library_paths.iter()) {
let all_paths = emsdk_lib_paths.into_iter().chain(library_paths.into_iter()).collect::<Vec<_>>();
for &path in all_paths.iter() {
// check if all librarys are in the path
let mut found = true;
for library in libraries {
Expand All @@ -50,7 +51,7 @@ pub fn find_runtime_path(libraries: &[&str] ) -> Result<String> {
return Ok(path.to_owned());
}
}
Err(anyhow!("Could not find {:?} in LIBRARY_PATH {:?}", libraries, emsdk_lib_paths.iter().chain(library_paths.iter())))
Err(anyhow!("Could not find {:?} in LIBRARY_PATH {:?}", libraries, all_paths))
}

pub fn find_library_path(varients: &[& str]) -> Result<String> {
Expand Down

0 comments on commit 98971b0

Please sign in to comment.