@@ -36,11 +36,11 @@ if [ $CURRENT_STEP == $INSTALL_START ];then
3636 rm -rf " $root_dir " /{node,nwjs,package.nw}
3737 echo " ==========Initializing node=========="
3838 if [ -f " $root_dir /node/bin/node" ]; then
39- step_switch $INSTALL_NODE_SUCCESS
39+ step_switch $INSTALL_NPM_CONFIG_SUCCESS
4040 success " node安装完毕"
4141 else
4242 " $root_dir /tools/update-node.sh" $@
43- step_switch $INSTALL_NODE_SUCCESS
43+ step_switch $INSTALL_NPM_CONFIG_SUCCESS
4444 success " node ok"
4545 fi
4646
@@ -61,16 +61,8 @@ if [[ -z "$HOME" || "$HOME" = "/" ]]; then
6161 export HOME=" /tmp/home"
6262 mkdir -p /tmp/home
6363fi
64- if [ $CURRENT_STEP == $INSTALL_NODE_SUCCESS ]; then
65- npm config set prefix " $root_dir /cache/npm/node_global"
66- npm config set cache " $root_dir /cache/npm/node_cache"
67- if [ " $ACTION_MODE " != " true" ]; then
68- notice " 非ACTION模式, 设置镜像源"
69- npm config set registry http://registry.npmmirror.com/ # 注册模块镜像
70- npm config set disturl http://npmmirror.com/dist # node-gyp 编译依赖的 node 源码镜像
71- fi
72- step_switch $INSTALL_NPM_CONFIG_SUCCESS
73- fi
64+ npm config set prefix " $root_dir /cache/npm/node_global"
65+ npm config set cache " $root_dir /cache/npm/node_cache"
7466
7567if [ $CURRENT_STEP == $INSTALL_NPM_CONFIG_SUCCESS ]; then
7668 notice " =====安装node-gyp nw-gyp===="
@@ -136,7 +128,7 @@ if [ $CURRENT_STEP == $INSTALL_WECHAT_SUCCESS ];then
136128 " $root_dir /tools/fix-package-name.js"
137129
138130 notice " Patching wechat-devtools editor selection autocopy"
139- " $root_dir /tools/fix-selection-copy-node"
131+ " $root_dir /tools/fix-selection-copy-node.js "
140132
141133 notice " Patching wechat-devtools CLI supports"
142134 " $root_dir /tools/fix-cli.sh"
0 commit comments