Skip to content

Commit

Permalink
use existsSync, bump
Browse files Browse the repository at this point in the history
  • Loading branch information
TheJaredWilcurt committed Dec 16, 2023
1 parent 74407d2 commit 105fb75
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
10 changes: 2 additions & 8 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');

Expand All @@ -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 () {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down

0 comments on commit 105fb75

Please sign in to comment.