mirror of
https://github.com/hauke68/Magallanes.git
synced 2026-09-08 14:28:57 +02:00
[Nostromo] Refactor config load
This commit is contained in:
@@ -66,4 +66,12 @@ abstract class AbstractCommand extends Command
|
||||
$utils = new Utils();
|
||||
return $utils->getStageName($this->runtime->getStage());
|
||||
}
|
||||
|
||||
/**
|
||||
* Requires the configuration to be loaded
|
||||
*/
|
||||
protected function requireConfig()
|
||||
{
|
||||
$this->getApplication()->configure();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,6 +41,8 @@ class DumpCommand extends AbstractCommand
|
||||
*/
|
||||
protected function execute(InputInterface $input, OutputInterface $output)
|
||||
{
|
||||
$this->requireConfig();
|
||||
|
||||
$output->writeln('Starting <fg=blue>Magallanes</>');
|
||||
$output->writeln('');
|
||||
|
||||
|
||||
@@ -42,6 +42,8 @@ class EnvironmentsCommand extends AbstractCommand
|
||||
*/
|
||||
protected function execute(InputInterface $input, OutputInterface $output)
|
||||
{
|
||||
$this->requireConfig();
|
||||
|
||||
$output->writeln('Starting <fg=blue>Magallanes</>');
|
||||
$output->writeln('');
|
||||
|
||||
|
||||
@@ -58,6 +58,8 @@ class DeployCommand extends AbstractCommand
|
||||
*/
|
||||
protected function execute(InputInterface $input, OutputInterface $output)
|
||||
{
|
||||
$this->requireConfig();
|
||||
|
||||
$output->writeln('Starting <fg=blue>Magallanes</>');
|
||||
$output->writeln('');
|
||||
|
||||
|
||||
@@ -51,6 +51,8 @@ class ListCommand extends AbstractCommand
|
||||
*/
|
||||
protected function execute(InputInterface $input, OutputInterface $output)
|
||||
{
|
||||
$this->requireConfig();
|
||||
|
||||
$utils = new Utils();
|
||||
$output->writeln('Starting <fg=blue>Magallanes</>');
|
||||
$output->writeln('');
|
||||
|
||||
@@ -52,6 +52,8 @@ class RollbackCommand extends DeployCommand
|
||||
*/
|
||||
protected function execute(InputInterface $input, OutputInterface $output)
|
||||
{
|
||||
$this->requireConfig();
|
||||
|
||||
$output->writeln('Starting <fg=blue>Magallanes</>');
|
||||
$output->writeln('');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user