浏览代码

修复执行install命令主机不是127.0.0.1的时候安装失败问题

执行php think install --hostname 172.17.0.1 --password 1234 --force true的时候,假如用的主机名不是127.0.0.1的话,会安装失败,因为DB实例连接到本地了
kira 7 年之前
父节点
当前提交
03f6ba62d6
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      application/admin/command/Install.php

+ 1 - 1
application/admin/command/Install.php

@@ -59,7 +59,7 @@ class Install extends Command
 
         // 连接install命令中指定的数据库
         $instance = Db::connect([
-            'type' => 'mysql',
+            'type' => "{$config['type']}",
             'hostname' => "{$hostname}",
             'hostport' => "{$hostport}",
             'database' => "{$database}",