From 136a9e82182faf5b8ff3a3c2e5ae677cf491abc2 Mon Sep 17 00:00:00 2001 From: Flavio Copes Date: Sat, 2 Jan 2016 16:25:31 +0100 Subject: [PATCH] Also check for GPM permissions. Fixes #579 --- system/src/Grav/Common/GPM/GPM.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/system/src/Grav/Common/GPM/GPM.php b/system/src/Grav/Common/GPM/GPM.php index c6088e42e..3cdb64bba 100644 --- a/system/src/Grav/Common/GPM/GPM.php +++ b/system/src/Grav/Common/GPM/GPM.php @@ -327,6 +327,10 @@ class GPM extends Iterator $plugins = $this->getRepositoryPlugins(); if (!$themes && !$plugins) { + if (!is_writable(ROOT_DIR . '/cache/gpm')) { + throw new \RuntimeException("The cache/gpm folder is not writable. Please check the folder permissions."); + } + throw new \RuntimeException("GPM not reachable. Please check your internet connection or check the Grav site is reachable"); }