Skip to content

Commit 8f48e8b

Browse files
Added git reset
1 parent 71da5eb commit 8f48e8b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

build.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,12 @@ async function gitCloneOverload(name: ParserName) {
3434
const repoUrl = `https://github.com/${match[1]}.git`;
3535
const commitHash = match[2];
3636

37-
console.log(`🗑️ Deleting cached node dep for ${name}`);
37+
console.log(`🗑️ Deleting cached node dependency for ${name}`);
3838
await exec(`rm -rf ${packagePath}`);
39-
console.log(`⬇️ Cloning ${name} from git (${commitHash})`);
39+
console.log(`⬇️ Cloning ${name} from git`);
4040
await exec(`git clone ${repoUrl} ${packagePath}`);
41+
process.chdir(packagePath);
42+
await exec(`git reset --hard ${commitHash}`);
4143
} catch (e) {
4244
console.error(`❗Failed to clone git repo for ${name}:\n`, e);
4345
hasErrors = true;

0 commit comments

Comments
 (0)