From 84e123a405cca499352d365e85374d4013796c6f Mon Sep 17 00:00:00 2001 From: denisdulici Date: Tue, 31 Dec 2019 17:40:14 +0300 Subject: [PATCH] check if env exists --- app/Utilities/Installer.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Utilities/Installer.php b/app/Utilities/Installer.php index 39d72789e..40c12794c 100644 --- a/app/Utilities/Installer.php +++ b/app/Utilities/Installer.php @@ -126,13 +126,13 @@ class Installer public static function createDefaultEnvFile() { // Rename file - if (is_file(base_path('.env.example'))) { + if (!is_file(base_path('.env')) && is_file(base_path('.env.example'))) { File::move(base_path('.env.example'), base_path('.env')); } // Update .env file static::updateEnv([ - 'APP_KEY' => 'base64:'.base64_encode(random_bytes(32)), + 'APP_KEY' => 'base64:'.base64_encode(random_bytes(32)), ]); }