Skip to content

Commit

Permalink
Don't bail if we can't find the path for a version reported by py.exe
Browse files Browse the repository at this point in the history
Some weird or broken installs can be reported by py.exe. We shouldn't
fail to run just because of these installs as others could exist that
work.
  • Loading branch information
yodaldevoid committed Jun 2, 2022
1 parent df008aa commit d922130
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/python_interpreter/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,11 @@ fn find_all_windows(target: &Target, min_python_minor: usize) -> Result<Vec<Stri
.unwrap();
let path = str::from_utf8(&output.stdout).unwrap().trim();
if !output.status.success() || path.trim().is_empty() {
bail!("Couldn't determine the path to python for `py {}`", version);
eprintln!(
"⚠️ Warning: couldn't determine the path to python for `py {}`",
version
);
continue;
}
interpreter.push(path.to_string());
versions_found.insert((major, minor));
Expand Down

0 comments on commit d922130

Please sign in to comment.