diff options
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/patcher/common.js | 24 | ||||
-rw-r--r-- | scripts/patcher/install.js | 2 |
2 files changed, 13 insertions, 13 deletions
diff --git a/scripts/patcher/common.js b/scripts/patcher/common.js index 94cb383..f750601 100644 --- a/scripts/patcher/common.js +++ b/scripts/patcher/common.js @@ -63,8 +63,8 @@ function question(question) { terminal: false, }); - return new Promise((resolve) => { - rl.question(question, (answer) => { + return new Promise(resolve => { + rl.question(question, answer => { rl.close(); resolve(answer); }); @@ -72,7 +72,7 @@ function question(question) { } async function getMenuItem(installations) { - let menuItems = installations.map((info) => ({ + let menuItems = installations.map(info => ({ title: info.patched ? "[MODIFIED] " + info.location : info.location, info, })); @@ -122,9 +122,9 @@ function getWindowsDirs() { const appDirs = fs .readdirSync(location, { withFileTypes: true }) - .filter((file) => file.isDirectory()) - .filter((file) => file.name.startsWith("app-")) - .map((file) => path.join(location, file.name)); + .filter(file => file.isDirectory()) + .filter(file => file.name.startsWith("app-")) + .map(file => path.join(location, file.name)); let versions = []; let patched = false; @@ -169,9 +169,9 @@ function getDarwinDirs() { const appDirs = fs .readdirSync(location, { withFileTypes: true }) - .filter((file) => file.isDirectory()) - .filter((file) => file.name.startsWith("Resources")) - .map((file) => path.join(location, file.name)); + .filter(file => file.isDirectory()) + .filter(file => file.name.startsWith("Resources")) + .map(file => path.join(location, file.name)); let versions = []; let patched = false; @@ -239,13 +239,13 @@ function getLinuxDirs() { } else { appDirs = fs .readdirSync(location, { withFileTypes: true }) - .filter((file) => file.isDirectory()) + .filter(file => file.isDirectory()) .filter( - (file) => + file => file.name.startsWith("app-") || file.name === "resources" ) - .map((file) => path.join(location, file.name)); + .map(file => path.join(location, file.name)); } let versions = []; diff --git a/scripts/patcher/install.js b/scripts/patcher/install.js index f423ce9..c9babc8 100644 --- a/scripts/patcher/install.js +++ b/scripts/patcher/install.js @@ -96,7 +96,7 @@ async function install(installations) { const requiredFiles = ["index.js", "package.json"]; - if (requiredFiles.every((f) => fs.existsSync(path.join(dir, f)))) { + if (requiredFiles.every(f => fs.existsSync(path.join(dir, f)))) { console.log( "Successfully patched", version.name |