Небольшие переименования
This commit is contained in:
@@ -52,7 +52,7 @@ class ConfigManager {
|
|||||||
return instance;
|
return instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
async init(tempDataDir, configFile) {
|
async init(defaultDataDir, configFile) {
|
||||||
if (this.inited)
|
if (this.inited)
|
||||||
throw new Error('already inited');
|
throw new Error('already inited');
|
||||||
|
|
||||||
@@ -69,14 +69,14 @@ class ConfigManager {
|
|||||||
this.branchConfigFile = __dirname + `/${this.branch}.js`;
|
this.branchConfigFile = __dirname + `/${this.branch}.js`;
|
||||||
const config = require(this.branchConfigFile);
|
const config = require(this.branchConfigFile);
|
||||||
|
|
||||||
if (!tempDataDir) {
|
if (!defaultDataDir) {
|
||||||
tempDataDir = `${config.execDir}/.${config.name}`;
|
defaultDataDir = `${config.execDir}/.${config.name}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (configFile) {
|
if (configFile) {
|
||||||
config.configFile = path.resolve(configFile);
|
config.configFile = path.resolve(configFile);
|
||||||
} else {
|
} else {
|
||||||
config.configFile = `${tempDataDir}/config.json`;
|
config.configFile = `${defaultDataDir}/config.json`;
|
||||||
}
|
}
|
||||||
|
|
||||||
this._config = config;
|
this._config = config;
|
||||||
|
|||||||
Reference in New Issue
Block a user