Skip to content

Commit

Permalink
Update update-self.js
Browse files Browse the repository at this point in the history
  • Loading branch information
justkeepquiet committed Apr 19, 2024
1 parent 4f3944d commit 25c0042
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions bin/update-self.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ const EventEmitter = require('events');

// Constants
const AutoUpdateServers = [
'https://git.teragame.su/tera-private-toolbox/tera-toolbox-beta/raw/'
'https://raw.githubusercontent.com/tera-private-toolbox/tera-toolbox/',
'https://git.teragame.su/tera-private-toolbox/tera-toolbox/raw/',
];

// Implementation
Expand Down Expand Up @@ -35,7 +36,11 @@ class Updater extends EventEmitter {
super();
this.setMaxListeners(0);

this.branch = branch;
// Fallback
delete require.cache[require.resolve('./config')];
const config = require('./config').loadConfig();

this.branch = config.branch || branch;
}

buildPath(relpath) { return path.join(__dirname, '..', relpath); }
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"bin/mod.js": "ec0dddbaaf291e647461294b06ac7294d00881e7671488d1b059a74e2885b6e5",
"bin/proxy.js": "a03415608cb17cd4ce3781e3613cb2aba3da6885497fb4b4c920227f19ef5cc2",
"bin/update-electron.js": "ee2868dde6572dd3aee97f6b45a3b90b071e46ed91ded2513ae4ef298c9cad46",
"bin/update-self.js": "1442fe94d4f51d9dd037c589f3c40da71d0322c8f28176c9f7952a5c29f199aa",
"bin/update-self.js": "b1e8e4e4b9ea6d1b62ebafa5dc90b0638173d2642217b565c4201876600640fd",
"bin/update.js": "1c1bb5b525738bd40525677f843c568ee1ed8f415325a914f42a8a5384fe9a31",
"bin/utils.js": "7a63e8cf007a96c5099eb1dca1cf54689b14e2964c0ae849c8b2baac8adac509",
"data/data.json": "7f77405b96f9384bdb33bcca7c70b8137bca68626a03bac3c22e1912a439a338",
Expand Down

0 comments on commit 25c0042

Please sign in to comment.