Some installer fixes (clear cache, direct install with full package)

This commit is contained in:
Matias Griese
2019-02-05 13:23:16 +02:00
parent b6ab086bf7
commit 06eee1e711
3 changed files with 15 additions and 4 deletions

View File

@@ -9,6 +9,7 @@
namespace Grav\Console\Gpm;
use Grav\Common\Cache;
use Grav\Common\Grav;
use Grav\Common\Filesystem\Folder;
use Grav\Common\GPM\GPM;
@@ -271,13 +272,14 @@ class DirectInstallCommand extends ConsoleCommand
private function upgradeGrav($zip, $folder, $keepFolder = false)
{
static $ignores = [
'assets',
'backup',
'cache',
'images',
'logs',
'tmp',
'user'
'user',
'.htaccess',
'robots.txt'
];
if (!is_dir($folder)) {
@@ -297,6 +299,8 @@ class DirectInstallCommand extends ConsoleCommand
$folder,
$keepFolder
);
Cache::clearCache();
}
} catch (\Exception $e) {
Installer::setError($e->getMessage());

View File

@@ -9,6 +9,7 @@
namespace Grav\Console\Gpm;
use Grav\Common\Cache;
use Grav\Common\Filesystem\Folder;
use Grav\Common\GPM\Installer;
use Grav\Common\GPM\Response;
@@ -273,13 +274,14 @@ class SelfupgradeCommand extends ConsoleCommand
private function upgradeGrav($zip, $folder, $keepFolder = false)
{
static $ignores = [
'assets',
'backup',
'cache',
'images',
'logs',
'tmp',
'user'
'user',
'.htaccess',
'robots.txt'
];
if (!is_dir($folder)) {
@@ -299,6 +301,8 @@ class SelfupgradeCommand extends ConsoleCommand
$folder,
$keepFolder
);
Cache::clearCache();
}
} catch (\Exception $e) {
Installer::setError($e->getMessage());

View File

@@ -10,6 +10,7 @@
namespace Grav\Installer;
use Composer\Autoload\ClassLoader;
use Grav\Common\Cache;
use Grav\Common\GPM\Installer;
use Grav\Common\Grav;
use Grav\Common\Plugins;
@@ -215,6 +216,8 @@ class Install
*/
public function finalize(): void
{
Cache::clearCache();
clearstatcache();
if (function_exists('opcache_reset')) {
@opcache_reset();