Skip to content

Commit

Permalink
Make cmd_finder.rs not to follow symbolic link to test if python is i…
Browse files Browse the repository at this point in the history
…nstalled. (#112)

This fixes #108
  • Loading branch information
oxkenshin authored Aug 18, 2021
1 parent 047e288 commit ec0a992
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions shaderc-sys/build/cmd_finder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,12 @@ impl CommandFinder {
let target = path.join(&cmd);
let mut cmd_alt = cmd.clone();
cmd_alt.push(".exe");
let mut symlink_is_file = false;
if let Ok(metadata) = target.with_extension("exe").symlink_metadata() {
symlink_is_file = metadata.is_file()
}
if target.is_file() || // some/path/git
symlink_is_file ||
target.with_extension("exe").exists() || // some/path/git.exe
target.join(&cmd_alt).exists()
{
Expand Down

0 comments on commit ec0a992

Please sign in to comment.