瀏覽代碼

Update Installer.php

Shlee 3 年之前
父節點
當前提交
a0bca2668a
共有 1 個文件被更改,包括 6 次插入0 次删除
  1. 6 0
      app/Console/Commands/Installer.php

+ 6 - 0
app/Console/Commands/Installer.php

@@ -111,6 +111,12 @@ class Installer extends Command
 
     protected function envCreate()
     {
+        if( $this->option('dangerously-overwrite-env') ) {
+            $this->line('');
+            $this->error('Existing .env File Found - Renaming to .env.danger');
+            exec('cp .env .env.danger');
+        }
+        
         $this->line('');
         $this->info('Creating .env if required');
         if(!file_exists(app()->environmentFilePath())) {