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 90081c6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2948,8 +2948,8 @@ 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,
Err(_) => return None,
Ok(tool) if !tool.is_empty() => tool,
_ => return None,
};

// If this is an exact path on the filesystem we don't want to do any
Expand Down

0 comments on commit 90081c6

Please sign in to comment.