Skip to content

Commit

Permalink
Rollup merge of rust-lang#67432 - Mark-Simulacrum:fix-toolstate, r=Ce…
Browse files Browse the repository at this point in the history
…ntril

Fix toolstate history format

We were inserting *before* the existing newline, so we should prepend it
not append it to our inserted string.
  • Loading branch information
Mark-Simulacrum authored Dec 19, 2019
2 parents e2c608b + 1787b2b commit 32bf790
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/bootstrap/toolstate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}

Expand Down

0 comments on commit 32bf790

Please sign in to comment.