mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
generate-copyright: Ensure output has UNIX line-endings for consistency.
This commit is contained in:
@@ -57,6 +57,10 @@ fn main() -> Result<(), Error> {
|
||||
dependencies: collected_cargo_metadata,
|
||||
};
|
||||
let output = template.render()?;
|
||||
// Git stores text files with \n, but this file may contain \r\n in files
|
||||
// copied from dependencies. Normalise them before we write them out, for
|
||||
// consistency.
|
||||
let output = output.replace("\r\n", "\n");
|
||||
std::fs::write(&dest_file, output)?;
|
||||
|
||||
// Output libstd subset file
|
||||
@@ -65,6 +69,10 @@ fn main() -> Result<(), Error> {
|
||||
dependencies: library_collected_cargo_metadata,
|
||||
};
|
||||
let output = template.render()?;
|
||||
// Git stores text files with \n, but this file may contain \r\n in files
|
||||
// copied from dependencies. Normalise them before we write them out, for
|
||||
// consistency.
|
||||
let output = output.replace("\r\n", "\n");
|
||||
std::fs::write(&libstd_dest_file, output)?;
|
||||
|
||||
Ok(())
|
||||
|
||||
Reference in New Issue
Block a user