diff --git a/index.js b/index.js index fed4ad3..2958170 100644 --- a/index.js +++ b/index.js @@ -2,7 +2,7 @@ // SUPER IMPORTANT: // Node is extremely annoying and refuses to allow ESM imports in -// CLI tools, so we have to use require here, do not change to import. +// CLI tools, so we have to use require here. Do not change to import. const fs = require('node:fs').promises; const path = require('node:path'); @@ -17,13 +17,7 @@ let originalManifestIndentation = 2; let originalManifestEOL = '\n'; function fileExists (file) { - return fs.access(file, fs.constants.F_OK) - .then(() => { - return true; - }) - .catch(() => { - return false; - }); + return fs.existsSync(file); } function getVersions () { diff --git a/package.json b/package.json index 8289b23..4881c7a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "base-volta-off-of-nwjs", - "version": "1.0.2", + "version": "1.0.3", "main": "index.js", "bin": "./index.js", "license": "MIT",