mirror of
https://github.com/denoland/deno.git
synced 2024-12-21 23:04:45 -05:00
fix(lockfile): emit trailing newline (#17618)
This commit is contained in:
parent
690b6ac39e
commit
f6f76a76b2
2 changed files with 4 additions and 2 deletions
|
@ -1306,7 +1306,8 @@ fn lock_file_lock_write() {
|
|||
}
|
||||
}
|
||||
}
|
||||
}"#;
|
||||
}
|
||||
"#;
|
||||
temp_dir.write("deno.lock", lock_file_content);
|
||||
|
||||
let deno = util::deno_cmd_with_deno_dir(&deno_dir)
|
||||
|
|
|
@ -187,7 +187,8 @@ impl Lockfile {
|
|||
return Ok(());
|
||||
}
|
||||
|
||||
let json_string = serde_json::to_string_pretty(&self.content).unwrap();
|
||||
let mut json_string = serde_json::to_string_pretty(&self.content).unwrap();
|
||||
json_string.push('\n'); // trailing newline in file
|
||||
let mut f = std::fs::OpenOptions::new()
|
||||
.write(true)
|
||||
.create(true)
|
||||
|
|
Loading…
Reference in a new issue