mirror of
https://github.com/flarum/framework.git
synced 2024-12-13 23:23:45 +08:00
Extract method
This commit is contained in:
parent
f2b05798e2
commit
e4ceb84aaf
|
@ -106,7 +106,7 @@ class InstallCommand extends Command
|
|||
|
||||
$this->enableBundledExtensions();
|
||||
} catch (Exception $e) {
|
||||
@unlink(base_path('../config.php'));
|
||||
@unlink($this->getConfigFile());
|
||||
|
||||
throw $e;
|
||||
}
|
||||
|
@ -139,7 +139,7 @@ class InstallCommand extends Command
|
|||
$this->info('Writing config');
|
||||
|
||||
file_put_contents(
|
||||
base_path('../config.php'),
|
||||
$this->getConfigFile(),
|
||||
'<?php return '.var_export($config, true).';'
|
||||
);
|
||||
}
|
||||
|
@ -252,4 +252,9 @@ class InstallCommand extends Command
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected function getConfigFile()
|
||||
{
|
||||
return base_path('../config.php');
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user