Skip to content

Commit 25c0042

Browse files
committed
Update update-self.js
1 parent 4f3944d commit 25c0042

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

bin/update-self.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ const EventEmitter = require('events');
77

88
// Constants
99
const AutoUpdateServers = [
10-
'https://git.teragame.su/tera-private-toolbox/tera-toolbox-beta/raw/'
10+
'https://raw.githubusercontent.com/tera-private-toolbox/tera-toolbox/',
11+
'https://git.teragame.su/tera-private-toolbox/tera-toolbox/raw/',
1112
];
1213

1314
// Implementation
@@ -35,7 +36,11 @@ class Updater extends EventEmitter {
3536
super();
3637
this.setMaxListeners(0);
3738

38-
this.branch = branch;
39+
// Fallback
40+
delete require.cache[require.resolve('./config')];
41+
const config = require('./config').loadConfig();
42+
43+
this.branch = config.branch || branch;
3944
}
4045

4146
buildPath(relpath) { return path.join(__dirname, '..', relpath); }

manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"bin/mod.js": "ec0dddbaaf291e647461294b06ac7294d00881e7671488d1b059a74e2885b6e5",
3535
"bin/proxy.js": "a03415608cb17cd4ce3781e3613cb2aba3da6885497fb4b4c920227f19ef5cc2",
3636
"bin/update-electron.js": "ee2868dde6572dd3aee97f6b45a3b90b071e46ed91ded2513ae4ef298c9cad46",
37-
"bin/update-self.js": "1442fe94d4f51d9dd037c589f3c40da71d0322c8f28176c9f7952a5c29f199aa",
37+
"bin/update-self.js": "b1e8e4e4b9ea6d1b62ebafa5dc90b0638173d2642217b565c4201876600640fd",
3838
"bin/update.js": "1c1bb5b525738bd40525677f843c568ee1ed8f415325a914f42a8a5384fe9a31",
3939
"bin/utils.js": "7a63e8cf007a96c5099eb1dca1cf54689b14e2964c0ae849c8b2baac8adac509",
4040
"data/data.json": "7f77405b96f9384bdb33bcca7c70b8137bca68626a03bac3c22e1912a439a338",

0 commit comments

Comments
 (0)