about summary refs log tree commit diff
path: root/src/bootstrap
diff options
context:
space:
mode:
authorMark Rousskov <mark.simulacrum@gmail.com>2019-12-19 13:48:36 -0500
committerMark Rousskov <mark.simulacrum@gmail.com>2019-12-19 13:48:36 -0500
commit1787b2b5aba0231ce26a05c4f7a2d6caf8263f0c (patch)
treea63d21ee47187a13e7a11df322e3f9c4f056ee20 /src/bootstrap
parent0de96d37fbcc54978458c18f5067cd9817669bc8 (diff)
downloadrust-1787b2b5aba0231ce26a05c4f7a2d6caf8263f0c.tar.gz
rust-1787b2b5aba0231ce26a05c4f7a2d6caf8263f0c.zip
Fix toolstate history format
We were inserting *before* the existing newline, so we should prepend it
not append it to our inserted string.
Diffstat (limited to 'src/bootstrap')
-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 a6d9ef38e57..7e547c7799b 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));
 }