mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-03-17 12:44:51 +08:00
修复 v3.sh 在无 PHP 环境下无法安装的问题
This commit is contained in:
parent
6dc6d93d82
commit
d92e7fe9d2
@ -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
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user