mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
BUG Fix upgrade-code doctor
with public path
This commit is contained in:
parent
5a18c3c405
commit
20348b5f42
@ -36,11 +36,13 @@ class UpgradeBootstrap
|
||||
*/
|
||||
public function __invoke(InputInterface $input, OutputInterface $output, $basePath)
|
||||
{
|
||||
$publicPath = file_exists("{$basePath}/public") ? "{$basePath}/public" : $basePath;
|
||||
|
||||
// Fail if destination isn't writable
|
||||
$this->ensureWritable($basePath);
|
||||
$this->ensureWritable($publicPath);
|
||||
|
||||
// Check source
|
||||
$source = $basePath . '/vendor/silverstripe/recipe-core';
|
||||
$source = $basePath . '/vendor/silverstripe/recipe-core/public';
|
||||
if (!is_dir($source)) {
|
||||
throw new BadMethodCallException("silverstripe/recipe-core is not installed.");
|
||||
}
|
||||
@ -49,7 +51,7 @@ class UpgradeBootstrap
|
||||
$output->writeln("Upgrading project bootstrapping files:");
|
||||
foreach ($this->files as $file => $canCreate) {
|
||||
$fileSource = $source . '/' . $file;
|
||||
$fileDest = $basePath . '/' . $file;
|
||||
$fileDest = $publicPath . '/' . $file;
|
||||
|
||||
// Skip if we should only upgrade existing files
|
||||
if (!$canCreate && !file_exists($fileDest)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user