mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-08 22:23:02 -04:00
parent
e563521416
commit
74c3930e0a
41 changed files with 141 additions and 87 deletions
|
@ -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 = [];
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue