From 1253462ea48db362faad864695a172f5a56759ca Mon Sep 17 00:00:00 2001 From: Hoikan <30694822+HoikanChan@users.noreply.github.com> Date: Tue, 10 Jan 2023 11:59:38 +0800 Subject: [PATCH] Refactor: Reuse variable "remoteRepoDir" (#25740) Reuse variable `remoteRepoDir` , same with `join(__dirname, 'remote-repo')`. --- scripts/bench/build.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/bench/build.js b/scripts/bench/build.js index 9147d8519e524..9c10379a0ebf9 100644 --- a/scripts/bench/build.js +++ b/scripts/bench/build.js @@ -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();