Browse Source

optimization install

Tokumeikoi 5 years ago
parent
commit
e57a70970f
1 changed files with 3 additions and 1 deletions
  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');