about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMark Rousskov <mark.simulacrum@gmail.com>2019-12-19 17:53:57 -0500
committerGitHub <noreply@github.com>2019-12-19 17:53:57 -0500
commit8f20e675018d95dab6c39fef7a124f9ba7c4fc8c (patch)
tree61524d537d4c1e8c60a1967ea5b67c2af3177496
parentac80d59e9747a84a9632bddade5be9091118433f (diff)
parent1787b2b5aba0231ce26a05c4f7a2d6caf8263f0c (diff)
downloadrust-8f20e675018d95dab6c39fef7a124f9ba7c4fc8c.tar.gz
rust-8f20e675018d95dab6c39fef7a124f9ba7c4fc8c.zip
Rollup merge of #67432 - Mark-Simulacrum:fix-toolstate, r=Centril
Fix toolstate history format

We were inserting *before* the existing newline, so we should prepend it
not append it to our inserted string.
-rw-r--r--src/bootstrap/toolstate.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bootstrap/toolstate.rs b/src/bootstrap/toolstate.rs
index b5ebf835506..f0e343ef22a 100644
--- a/src/bootstrap/toolstate.rs
+++ b/src/bootstrap/toolstate.rs
@@ -413,7 +413,7 @@ fn change_toolstate(
     let history_path = format!("rust-toolstate/history/{}.tsv", OS.expect("linux/windows only"));
     let mut file = t!(fs::read_to_string(&history_path));
     let end_of_first_line = file.find('\n').unwrap();
-    file.insert_str(end_of_first_line, &format!("{}\t{}\n", commit, toolstate_serialized));
+    file.insert_str(end_of_first_line, &format!("\n{}\t{}", commit, toolstate_serialized));
     t!(fs::write(&history_path, file));
 }