From 9f6d1ada9393dfdf4a102b1c3622aa7e94103f30 Mon Sep 17 00:00:00 2001 From: tokumeikoi Date: Tue, 7 Sep 2021 03:18:45 +0900 Subject: [PATCH] update: v2board install --- app/Console/Commands/V2boardInstall.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/app/Console/Commands/V2boardInstall.php b/app/Console/Commands/V2boardInstall.php index bdaeb750..1ebc707d 100644 --- a/app/Console/Commands/V2boardInstall.php +++ b/app/Console/Commands/V2boardInstall.php @@ -47,13 +47,12 @@ class V2boardInstall extends Command $this->info(" \ \ / / __) | _ \ / _ \ / _` | '__/ _` | "); $this->info(" \ V / / __/| |_) | (_) | (_| | | | (_| | "); $this->info(" \_/ |_____|____/ \___/ \__,_|_| \__,_| "); - if (\File::exists(base_path() . '/.lock')) { + if (\File::exists(base_path() . '/.env')) { abort(500, 'V2board 已安装,如需重新安装请删除目录下.lock文件'); } - if (!\File::exists(base_path() . '/.env')) { - if (!copy(base_path() . '/.env.example', base_path() . '/.env')) { - abort(500, '复制环境文件失败,请检查目录权限'); - } + + if (!copy(base_path() . '/.env.example', base_path() . '/.env')) { + abort(500, '复制环境文件失败,请检查目录权限'); } $this->saveToEnv([ 'APP_KEY' => 'base64:' . base64_encode(Encrypter::generateKey('AES-256-CBC')),