From b93099a3dfe8ec73e0a7eed9f449ec8d05b114d8 Mon Sep 17 00:00:00 2001 From: kuaifan Date: Thu, 22 Oct 2026 11:19:18 +0000 Subject: [PATCH] =?UTF-8?q?fix(install):=20=E7=94=9F=E6=88=90=20APP=5FKEY?= =?UTF-8?q?=20=E5=90=8E=E9=87=8D=E5=90=AF=20php=EF=BC=8C=E9=81=BF=E5=85=8D?= =?UTF-8?q?=20LaravelS=20=E5=85=88=E4=BA=8E=E5=AF=86=E9=92=A5=E5=90=AF?= =?UTF-8?q?=E5=8A=A8=E5=AF=BC=E8=87=B4=E5=85=A8=E6=96=B0=E5=AE=89=E8=A3=85?= =?UTF-8?q?=E5=90=8E=E6=9C=8D=E5=8A=A1=E4=B8=8D=E5=8F=AF=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cmd | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cmd b/cmd index 54cb63cbd..293dcf24f 100755 --- a/cmd +++ b/cmd @@ -897,8 +897,11 @@ handle_install() { exit 1 fi - # 生成应用密钥 - [[ -z "$(env_get APP_KEY)" ]] && exec_judge "container_exec php 'php artisan key:generate'" "$(msg '生成密钥失败')" + # 生成应用密钥(LaravelS 可能在 composer install 后已先行启动,需重启以加载新密钥) + if [[ -z "$(env_get APP_KEY)" ]]; then + exec_judge "container_exec php 'php artisan key:generate'" "$(msg '生成密钥失败')" + restart_php + fi # 设置生产模式 switch_debug "false"