Skip to content

Commit

Permalink
fix(env_tool): return None if env is empty
Browse files Browse the repository at this point in the history
Signed-off-by: DragonBillow <[email protected]>
  • Loading branch information
cathaysia committed Apr 1, 2024
1 parent be62f4a commit 28cee90
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2948,7 +2948,12 @@ impl Build {
/// Returns compiler path, optional modifier name from whitelist, and arguments vec
fn env_tool(&self, name: &str) -> Option<(PathBuf, Option<String>, Vec<String>)> {
let tool = match self.getenv_with_target_prefixes(name) {
Ok(tool) => tool,
Ok(tool) => {
if tool.is_empty() {
return None;
}
tool
}
Err(_) => return None,
};

Expand Down

0 comments on commit 28cee90

Please sign in to comment.