Merge branch 'develop' into feature/alternative_debugger

This commit is contained in:
Andy Miller 2014-10-14 12:49:27 -06:00
commit d93e17cff4
5 changed files with 15 additions and 8 deletions

View File

@ -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);
}
}
}

View File

@ -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);
}
}

View File

@ -114,6 +114,9 @@ class InstallCommand extends Command
}
}
}
// clear cache after successful upgrade
$this->clearCache();
}
private function downloadPackage($package)

View File

@ -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)

View File

@ -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)