From 97f9eddf90a439724dd5d116a5d7661aef93e8f0 Mon Sep 17 00:00:00 2001 From: Damian Mooyman Date: Wed, 25 Oct 2017 14:53:00 +1300 Subject: [PATCH] Warn if env isn't writable --- src/Dev/Install/InstallRequirements.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/Dev/Install/InstallRequirements.php b/src/Dev/Install/InstallRequirements.php index 6be55d0be..d650a6b49 100644 --- a/src/Dev/Install/InstallRequirements.php +++ b/src/Dev/Install/InstallRequirements.php @@ -259,6 +259,8 @@ class InstallRequirements $this->requireWriteable('index.php', array("File permissions", "Is the index.php file writeable?", null)); + $this->requireWriteable('.env', ["File permissions", "Is the .env file writeable?", null], false, false); + if ($isApache) { $this->checkApacheVersion(array( "Webserver Configuration", @@ -826,7 +828,7 @@ class InstallRequirements } } - public function requireWriteable($filename, $testDetails, $absolute = false) + public function requireWriteable($filename, $testDetails, $absolute = false, $error = true) { $this->testing($testDetails); @@ -878,7 +880,11 @@ class InstallRequirements $testDetails[2] .= "The webserver user needs to be able to write to this file:\n$filename"; } - $this->error($testDetails); + if ($error) { + $this->error($testDetails); + } else { + $this->warning($testDetails); + } } }