fix(xtask): reset fixtures when checking out new version
This commit is contained in:
parent
3b0273fc61
commit
f95a52df4a
1 changed files with 9 additions and 0 deletions
|
|
@ -59,6 +59,15 @@ pub fn run_fixtures(args: &FetchFixtures) -> Result<()> {
|
|||
&format!("Failed to fetch tag {tag} for {grammar} grammar"),
|
||||
)?;
|
||||
|
||||
let mut reset_command = Command::new("git");
|
||||
reset_command
|
||||
.current_dir(&grammar_dir)
|
||||
.args(["reset", "--hard", "HEAD"]);
|
||||
bail_on_err(
|
||||
&reset_command.spawn()?.wait_with_output()?,
|
||||
&format!("Failed to reset {grammar} grammar working tree"),
|
||||
)?;
|
||||
|
||||
let mut checkout_command = Command::new("git");
|
||||
checkout_command
|
||||
.current_dir(&grammar_dir)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue