Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Windows Store install detection #949

Merged
merged 2 commits into from
Jun 3, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions 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 Expand Up @@ -230,7 +234,7 @@ fn find_all_windows(target: &Target, min_python_minor: usize) -> Result<Vec<Stri
// Fallback to pythonX.Y for Microsoft Store versions
for minor in min_python_minor..MAXIMUM_PYTHON_MINOR {
if !versions_found.contains(&(3, minor)) {
interpreter.push(format!("python3.{}", minor));
interpreter.push(format!("python3.{}.exe", minor));
versions_found.insert((3, minor));
}
}
Expand Down