Refactor: Reuse variable "remoteRepoDir" (#25740)

Reuse variable `remoteRepoDir` , same with `join(__dirname, 'remote-repo')`.
This commit is contained in:
Hoikan
2023-01-10 11:59:38 +08:00
committed by GitHub
parent 34464fb16c
commit 1253462ea4

View File

@@ -74,7 +74,7 @@ async function buildBenchmarkBundlesFromGitRepo(
await cleanDir(remoteRepoDir);
}
// check if remote-repo directory already exists
if (existsSync(join(__dirname, 'remote-repo'))) {
if (existsSync(remoteRepoDir)) {
repo = await Git.Repository.open(remoteRepoDir);
// fetch all the latest remote changes
await repo.fetchAll();