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

disable link bot node_modules to global (#1478)

上级 47723817
......@@ -136,20 +136,11 @@ function wechaty::runBot() {
echo "Please make sure you had installed all the NPM modules which is depended on your bot script."
# yarn < /dev/null || return $? # yarn will close stdin??? cause `read` command fail after yarn
cwd=$(pwd)
for module in node_modules/*; do
[ -e "$module" ] || continue
module=${module//node_modules\//}
globalModule="/node_modules/$module"
if [ ! -e "$globalModule" ]; then
ln -sf "$cwd/node_modules/$module" /node_modules/
# else
# echo "$globalModule exists"
fi
done
#
# Issue https://github.com/Chatie/wechaty/issues/1478
# As a conclusion: we should better not to link the local node_modules to the Docker global.
#
# wechaty::linkBotNodeModules
}
# echo -n "Linking Wechaty module to bot ... "
......@@ -196,6 +187,24 @@ function wechaty::runBot() {
return "$ret"
}
# Issue https://github.com/Chatie/wechaty/issues/1478
# To Be Tested:
function wechaty::linkBotNodeModules() {
for localModule in /bot/node_modules/*; do
[ -e "$localModule" ] || continue
module=${localModule//\/bot\/node_modules\//}
globalModule="/node_modules/$module"
if [ ! -e "$globalModule" ]; then
ln -sf "$localModule" /node_modules/
# else
# echo "$globalModule exists"
fi
done
}
function wechaty::io-client() {
figlet " Chatie.io "
figlet " Authing By:"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册