From e4482d17909d0202fecfaf6af9672f85f3a036ee Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Tue, 2 Apr 2019 13:28:54 -0700 Subject: [PATCH] Preserve env vars from `windows_registry` in `lib.exe` detection This was an accidental regression from #387 --- src/lib.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index a39b6d5..d995fed 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1987,11 +1987,8 @@ impl Build { "emar".to_string() } else if target.contains("msvc") { - match windows_registry::find_tool(&target, "lib.exe") { - Some(t) => match t.path().to_str() { - Some(ref p) => p.to_string(), - None => "lib.exe".to_string(), - }, + match windows_registry::find(&target, "lib.exe") { + Some(t) => return Ok((t, "lib.exe".to_string())), None => "lib.exe".to_string(), } } else {