From 105fb75a821500bd2139a4a660d6d726ea009c17 Mon Sep 17 00:00:00 2001 From: The Jared Wilcurt Date: Sat, 16 Dec 2023 13:16:27 -0500 Subject: [PATCH] use existsSync, bump --- index.js | 10 ++-------- package.json | 2 +- 2 files changed, 3 insertions(+), 9 deletions(-) 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",