Skip to content

Commit d9ee4df

Browse files
committed
Run git reset
1 parent 429e1f5 commit d9ee4df

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/run-prettier.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,14 @@ async function runPrettierWithVersion({
3939
cwd,
4040
env: { YARN_ENABLE_IMMUTABLE_INSTALLS: "false" },
4141
});
42+
await fs.rm(path.join(cwd, "yarn.lock"), { force: true });
43+
await spawn("git", ["reset", "--hard"], { cwd });
4244
await run();
4345
} else {
4446
throw error;
4547
}
4648
}
4749

48-
await fs.rm(path.join(cwd, "yarn.lock"), { force: true });
49-
5050
const commitHash = await commitChanges(cwd, prettier.version.kind);
5151

5252
await spawn("git", ["branch", prettier.version.kind], { cwd });

0 commit comments

Comments
 (0)