Skip to content

Commit

Permalink
Tweek pyenv version detection on windows (microsoft#23383)
Browse files Browse the repository at this point in the history
  • Loading branch information
DonJayamanne authored and anthonykim1 committed May 16, 2024
1 parent cdb58d4 commit 742cbfd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions native_locator/src/pyenv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ fn get_pyenv_version(folder_name: String) -> Option<String> {
None => None,
},
None => {
// Alpha Versions = like 3.10.0a3
let python_regex = Regex::new(r"^(\d+\.\d+.\d+a\d+)").unwrap();
// Alpha, rc Versions = like 3.10.0a3
let python_regex = Regex::new(r"^(\d+\.\d+.\d+\w\d+)").unwrap();
match python_regex.captures(&folder_name) {
Some(captures) => match captures.get(1) {
Some(version) => Some(version.as_str().to_string()),
Expand Down

0 comments on commit 742cbfd

Please sign in to comment.