diff options
Diffstat (limited to 'scripts/frontend/frontend_script_utils.js')
-rw-r--r-- | scripts/frontend/frontend_script_utils.js | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/scripts/frontend/frontend_script_utils.js b/scripts/frontend/frontend_script_utils.js index c942812ca74..99628ba428d 100644 --- a/scripts/frontend/frontend_script_utils.js +++ b/scripts/frontend/frontend_script_utils.js @@ -5,7 +5,6 @@ const exec = (command, args) => { const options = { cwd: process.cwd(), env: process.env, - stdio: 'pipe', encoding: 'utf-8', }; return execFileSync(command, args, options); @@ -18,12 +17,14 @@ const execGitCmd = args => .split('\n'); module.exports = { - getChangedFiles: () => - execGitCmd([ + getChangedFiles: fileExtensionFilter => { + const gitOptions = [ 'diff', '--name-only', - '--no-renames', '--cached', '--diff-filter=ACMRTUB', - ]), + ]; + if (fileExtensionFilter) gitOptions.push(...fileExtensionFilter); + return execGitCmd(gitOptions); + }, }; |