修改配置路径
This commit is contained in:
parent
5ff621c05b
commit
37af0bd7a6
@ -47,11 +47,11 @@ module.exports = class SystemConfig {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static getUserPath() {
|
static getUserPath() {
|
||||||
let userDirectory = '~';
|
// let userDirectory = '~';
|
||||||
if ( this.isWindows() ) {
|
// if ( this.isWindows() ) {
|
||||||
userDirectory = process.env.USERPROFILE;
|
// userDirectory = process.env.USERPROFILE;
|
||||||
}
|
// }
|
||||||
return userDirectory;
|
return os.homedir();
|
||||||
}
|
}
|
||||||
|
|
||||||
static getUserConfigPath() {
|
static getUserConfigPath() {
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
const shell = require("./shell");
|
const shell = require("./shell");
|
||||||
|
const os = require("os");
|
||||||
|
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
@ -12,7 +13,11 @@ module.exports = {
|
|||||||
shell.execSync("start " + uConfig.get("man"))
|
shell.execSync("start " + uConfig.get("man"))
|
||||||
});
|
});
|
||||||
parser.addCmdLine("manu", "人工维护配置;", function () {
|
parser.addCmdLine("manu", "人工维护配置;", function () {
|
||||||
|
if (os.type() === 'Windows_NT') {
|
||||||
shell.execSync("start " + $sConfig.getUserConfigPath())
|
shell.execSync("start " + $sConfig.getUserConfigPath())
|
||||||
|
} else {
|
||||||
|
console.log("请用浏览器访问:" + $sConfig.getUserConfigPath())
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
parser.addCmdLine("run [--file] [func]", "运行项目脚本;", function (cli) {
|
parser.addCmdLine("run [--file] [func]", "运行项目脚本;", function (cli) {
|
||||||
|
@ -48,10 +48,12 @@ module.exports = class Remote {
|
|||||||
async check() {
|
async check() {
|
||||||
|
|
||||||
if ( ! this.webdav ) {
|
if ( ! this.webdav ) {
|
||||||
|
$logger.info("webdav unable")
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! this.client ) {
|
if ( ! this.client ) {
|
||||||
|
$logger.info("client unable")
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user