From d92e7fe9d2f2a0ccbcb016d67ee881816b853b4c Mon Sep 17 00:00:00 2001 From: Jerry Ma Date: Thu, 19 Sep 2024 15:20:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20v3.sh=20=E5=9C=A8=E6=97=A0?= =?UTF-8?q?=20PHP=20=E7=8E=AF=E5=A2=83=E4=B8=8B=E6=97=A0=E6=B3=95=E5=AE=89?= =?UTF-8?q?=E8=A3=85=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ext/v3.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/v3.sh b/ext/v3.sh index 5d9b913c..3026548e 100755 --- a/ext/v3.sh +++ b/ext/v3.sh @@ -230,7 +230,7 @@ function if_restore_native_runtime() { fi if [ "$composer_executable" = "$ZM_TEMP_DIR/composer" ]; then echo "$(nhead) 移动内建 Composer 到框架目录 $ZM_RUNTIME_DIR ..." && \ - ([ -e "$ZM_TEMP_DIR/composer" ] && mv "$ZM_TEMP_DIR/composer" "$ZM_RUNTIME_DIR") || \ + ([ -e "$ZM_TEMP_DIR/composer" ] && mv "$ZM_TEMP_DIR/composer" "$ZM_RUNTIME_DIR") && \ ([ -e "$ZM_TEMP_DIR/composer.phar" ] && mv "$ZM_TEMP_DIR/composer.phar" "$ZM_RUNTIME_DIR") || { echo "$(nhead red) 移动内建 Composer 到框架目录失败!" && return 1 } @@ -251,10 +251,10 @@ function install_framework() { echo "$(nhead) 从 Composer 拉取框架 ..." && \ echo '{"minimum-stability":"dev","prefer-stable":true}' > composer.json && $composer_executable require -n zhamao/framework:^3.0 && \ $composer_executable require -n --dev swoole/ide-helper:^4.5 && \ + if_restore_native_runtime && \ vendor/bin/zhamao init && \ echo "$(nhead) 初始化框架脚手架文件 ..." && \ $composer_executable dump-autoload -n && \ - if_restore_native_runtime && \ show_success_msg || { echo "$(nhead red) 安装框架失败!" && cd $ZM_PWD && rm -rf "$ZM_CUSTOM_DIR" && return 1 }