From 18b0b08e13a5111c82b422a59005846a12928e71 Mon Sep 17 00:00:00 2001 From: Kravets Vadim Date: Wed, 28 Dec 2022 13:28:25 +0600 Subject: [PATCH] Added .env file existence check --- src/Console/DuskCommand.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Console/DuskCommand.php b/src/Console/DuskCommand.php index 6cfbc31fe..48b85ca54 100644 --- a/src/Console/DuskCommand.php +++ b/src/Console/DuskCommand.php @@ -224,7 +224,8 @@ protected function withDuskEnvironment($callback) protected function setupDuskEnvironment() { if (file_exists(base_path($this->duskFile()))) { - if (file_get_contents(base_path('.env')) !== file_get_contents(base_path($this->duskFile()))) { + if (file_exists(base_path('.env')) && + file_get_contents(base_path('.env')) !== file_get_contents(base_path($this->duskFile()))) { $this->backupEnvironment(); }