Write trailing newline to .python-version files (#7140)

## Summary

Closes https://github.com/astral-sh/uv/issues/7135.
This commit is contained in:
Charlie Marsh 2024-09-06 18:03:52 -04:00 committed by GitHub
parent 5e1b9b1964
commit 8a0e1fde33
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,3 +1,4 @@
use std::ops::Add;
use std::path::{Path, PathBuf};
use fs_err as fs;
@ -146,6 +147,7 @@ impl PythonVersionFile {
.iter()
.map(PythonRequest::to_canonical_string)
.join("\n")
.add("\n")
.as_bytes(),
)
.await