From 641cdcddef5796c2467583b7b8d6f848e00c9408 Mon Sep 17 00:00:00 2001 From: whyour Date: Sun, 2 May 2021 09:54:24 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BE=9D=E8=B5=96=E9=87=8D?= =?UTF-8?q?=E8=A3=85=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- shell/share.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/shell/share.sh b/shell/share.sh index e400625f..53f41ac3 100755 --- a/shell/share.sh +++ b/shell/share.sh @@ -218,8 +218,10 @@ npm_install_2() { cd $dir_work echo -e "检测到 $dir_work 的依赖包有变化,运行 npm install...\n" npm_install_sub - [[ $? -ne 0 ]] && echo -e "\n安装 $dir_work 的依赖包运行不成功,再次尝试一遍...\n" - npm_install_1 $dir_work + if [[ $? -ne 0 ]]; then + echo -e "\n安装 $dir_work 的依赖包运行不成功,再次尝试一遍...\n" + npm_install_1 $dir_work + fi cd $dir_current }