mirror of
https://github.com/getgrav/grav.git
synced 2025-02-20 19:56:53 +01:00
Merge branch 'develop' into feature/alternative_debugger
This commit is contained in:
commit
d93e17cff4
|
|
@ -150,10 +150,8 @@ class Installer
|
|||
}
|
||||
}
|
||||
} else {
|
||||
if (is_file($path)) {
|
||||
@unlink($path);
|
||||
@copy($tmp . DS . $filename, $path);
|
||||
}
|
||||
@unlink($path);
|
||||
@copy($tmp . DS . $filename, $path);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -64,10 +64,14 @@ trait ConsoleTrait
|
|||
}
|
||||
}
|
||||
|
||||
public function clearCache()
|
||||
public function clearCache($all = [])
|
||||
{
|
||||
if ($all) {
|
||||
$all = ['--all' => true];
|
||||
}
|
||||
|
||||
$command = new ClearCacheCommand();
|
||||
$input = new ArrayInput(array('--all' => true));
|
||||
$input = new ArrayInput($all);
|
||||
return $command->run($input, $this->output);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -114,6 +114,9 @@ class InstallCommand extends Command
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
// clear cache after successful upgrade
|
||||
$this->clearCache();
|
||||
}
|
||||
|
||||
private function downloadPackage($package)
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ use Grav\Common\GPM\Installer;
|
|||
use Grav\Common\GPM\Response;
|
||||
use Grav\Console\ConsoleTrait;
|
||||
use Symfony\Component\Console\Command\Command;
|
||||
use Symfony\Component\Console\Input\ArrayInput;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
|
|
@ -117,7 +116,7 @@ class SelfupgradeCommand extends Command
|
|||
}
|
||||
|
||||
// clear cache after successful upgrade
|
||||
$this->clearCache();
|
||||
$this->clearCache(true);
|
||||
}
|
||||
|
||||
private function download($package)
|
||||
|
|
|
|||
|
|
@ -128,6 +128,9 @@ class UpdateCommand extends Command
|
|||
$this->output->writeln("<red>Error:</red> An error occured while trying to install the extensions");
|
||||
exit;
|
||||
}
|
||||
|
||||
// clear cache after successful upgrade
|
||||
$this->clearCache();
|
||||
}
|
||||
|
||||
private function userInputPackages($onlyPackages)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user