cache: tweak generated .gitignore (#10226)

- Add a notice that this file was generated by ruff

 - Add a trailing newline
This commit is contained in:
Dominik Spicher 2024-03-04 10:49:51 +01:00 committed by GitHub
parent a6d892b1f4
commit 00300c0d9d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -383,7 +383,7 @@ pub(crate) fn init(path: &Path) -> Result<()> {
let gitignore_path = path.join(".gitignore"); let gitignore_path = path.join(".gitignore");
if !gitignore_path.exists() { if !gitignore_path.exists() {
let mut file = fs::File::create(gitignore_path)?; let mut file = fs::File::create(gitignore_path)?;
file.write_all(b"*")?; file.write_all(b"# Automatically created by ruff.\n*\n")?;
} }
Ok(()) Ok(())