From bf836f43134eb9f6d23952fe7f2ad81076ffbc3f Mon Sep 17 00:00:00 2001 From: Enoyao Date: Sat, 19 Mar 2022 06:32:02 +0800 Subject: [PATCH] cleanup(core): use full variable name in git-hasher.ts (#9143) --- packages/workspace/src/core/hasher/git-hasher.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/workspace/src/core/hasher/git-hasher.ts b/packages/workspace/src/core/hasher/git-hasher.ts index 51b49a455c576..9dcf1cbd3ad29 100644 --- a/packages/workspace/src/core/hasher/git-hasher.ts +++ b/packages/workspace/src/core/hasher/git-hasher.ts @@ -67,11 +67,11 @@ function getActualFilesToHash( ): { filesToHash: string[]; deleted: string[] } { const filesToHash = []; const deleted = []; - for (let f of potentialFilesToHash) { - if (fileExists(joinPathFragments(path, f))) { - filesToHash.push(f); + for (let file of potentialFilesToHash) { + if (fileExists(joinPathFragments(path, file))) { + filesToHash.push(file); } else { - deleted.push(f); + deleted.push(file); } } return { filesToHash, deleted }; @@ -83,11 +83,11 @@ async function spawnProcess(command: string, args: string[], cwd: string) { shell: false, cwd, }); - let s = ''; + let stdout = ''; for await (const data of cp.stdout) { - s += data; + stdout += data; } - return s; + return stdout; } async function getStagedFiles(path: string) {