浏览代码

optimization install

Tokumeikoi 5 年之前
父节点
当前提交
e57a70970f
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      app/Console/Commands/V2boardInstall.php

+ 3 - 1
app/Console/Commands/V2boardInstall.php

@@ -58,7 +58,9 @@ class V2boardInstall extends Command
         ]);
         \Artisan::call('config:clear');
         \Artisan::call('config:cache');
-        if (!DB::connection()->getPdo()) {
+        try {
+            DB::connection()->getPdo();
+        } catch (\Exception $e) {
             abort(500, '数据库连接失败');
         }
         $file = \File::get(base_path() . '/database/install.sql');