From f853e1816a4e36c8a0b5f0744625485db353a2fd Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sat, 11 Jan 2020 22:16:45 +0100 Subject: [PATCH] chore: improve call to exiftool --- webpack.config.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/webpack.config.js b/webpack.config.js index cc8b9918d..24e9c7aef 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -186,9 +186,9 @@ module.exports = { }).flat(1); })(), { apply: compiler => compiler.hooks.afterEmit.tap('AfterEmitPlugin', compilation => { - Array.from(glob.sync(path.resolve(__dirname, 'well-known', '**', '*.@(png)'))).forEach(imageFile => { - execSync(`exiftool -overwrite_original -all= ${imageFile}`, { stdio: 'inherit' }); - }); + const imgFiles = glob.sync(path.resolve(__dirname, 'well-known', '**', '*.@(png)')); + const imgFilesArgs = Array.from(imgFiles).join(" "); + execSync(`exiftool -overwrite_original -all= ${imgFilesArgs}`, { stdio: 'inherit' }); }) } ],