diff --git a/package-lock.json b/package-lock.json index 1187c5c..91c62d5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@j9t/imagemin-guard", - "version": "3.3.3", + "version": "3.3.4", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@j9t/imagemin-guard", - "version": "3.3.3", + "version": "3.3.4", "license": "Apache-2.0", "dependencies": { "chalk": "^5.3.0", diff --git a/package.json b/package.json index 5828402..0b2db71 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "@j9t/imagemin-guard", "description": "Ensure losslessly compressed JPG, PNG, GIF, WebP, and AVIF images (suitable for manual and automatic compression)", "author": "Jens Oliver Meiert", - "version": "3.3.3", + "version": "3.3.4", "type": "module", "license": "Apache-2.0", "repository": { diff --git a/src/index.js b/src/index.js index 5ec84da..85e080b 100644 --- a/src/index.js +++ b/src/index.js @@ -71,8 +71,8 @@ import { hideBin } from 'yargs/helpers' // Search for staged files if(argv.staged){ - sgf('A', async function(err, results){ - if(err){ + await sgf('A', async function (err, results) { + if (err) { return console.error(err) } @@ -80,10 +80,10 @@ import { hideBin } from 'yargs/helpers' .map(result => result.filename) .filter(filename => files.includes(filename)) - compress(compressionFiles, argv.dry) + await compress(compressionFiles, argv.dry) }) } else { - compress(compressionFiles, argv.dry) + await compress(compressionFiles, argv.dry) } })() \ No newline at end of file