From 8903afec2687e762238d161ef9d986be9a1786a3 Mon Sep 17 00:00:00 2001 From: Lukas Reschke Date: Tue, 8 Dec 2015 08:17:04 +0100 Subject: [PATCH] Don't write directives from CLI --- lib/private/setup.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/private/setup.php b/lib/private/setup.php index 4a555b3e415..97d01c50109 100644 --- a/lib/private/setup.php +++ b/lib/private/setup.php @@ -396,6 +396,11 @@ class Setup { * Append the correct ErrorDocument path for Apache hosts */ public static function updateHtaccess() { + // From CLI we don't know the defined web root. Thus we can't write any + // directives into the .htaccess file. + if(\OC::$CLI) { + return; + } $setupHelper = new \OC\Setup(\OC::$server->getConfig(), \OC::$server->getIniWrapper(), \OC::$server->getL10N('lib'), new \OC_Defaults(), \OC::$server->getLogger(), \OC::$server->getSecureRandom()); -- 2.39.5