提交 843d786d 编写于 作者: Huan (李卓桓)'s avatar Huan (李卓桓)

fix(config): try to identify if wechaty is installed globally

上级 eaa0b3d0
......@@ -90,18 +90,29 @@ Object.assign(Config, {
*/
Object.assign(Config, {
isDocker: isWechatyDocker(),
isGlobal: isWechatyInstalledGlobal(),
})
function isWechatyInstalledGlobal() {
/**
* TODO:
* 1. check /node_modules/wechaty
* 2. return true if exists
* 3. otherwise return false
*/
return false
}
function isWechatyDocker() {
/**
* Continuous Integration System
* false for Continuous Integration System
*/
if (isCi) {
return false
}
/**
* Cloud9 IDE
* false Cloud9 IDE
*/
const c9 = Object.keys(process.env)
.filter(k => /^C9_/.test(k))
......@@ -110,6 +121,9 @@ function isWechatyDocker() {
return false
}
/**
* return indentify result by NPM module `is-docker`
*/
return isDocker()
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册