Only report Python pins as updated if its the same file (#8894)

This commit is contained in:
Zanie Blue
2024-11-07 13:24:38 -06:00
parent 4d760ac1f9
commit c134ac2eab
2 changed files with 3 additions and 1 deletions
+2
View File
@@ -132,8 +132,10 @@ pub(crate) async fn pin(
new.write().await?;
// If we updated an existing version file to a new version
if let Some(existing) = existing
.as_ref()
.filter(|existing| existing.path() == new.path())
.and_then(PythonVersionFile::version)
.filter(|version| *version != new.version().unwrap())
{
+1 -1
View File
@@ -213,7 +213,7 @@ fn python_find_pin() {
success: true
exit_code: 0
----- stdout -----
Updated `.python-version` from `3.12` -> `3.11`
Pinned `.python-version` to `3.11`
----- stderr -----
"###);