Skip to content

Commit

Permalink
修复 v3.sh 在无 PHP 环境下无法安装的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
crazywhalecc committed Sep 19, 2024
1 parent 6dc6d93 commit d92e7fe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ext/v3.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand All @@ -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
}
Expand Down

0 comments on commit d92e7fe

Please sign in to comment.