Only report Python pins as updated if its the same file (#8894)
This commit is contained in:
@@ -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())
|
||||
{
|
||||
|
||||
@@ -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 -----
|
||||
"###);
|
||||
|
||||
Reference in New Issue
Block a user