Exemplo n.º 1
0
 /**
  * Always executed
  *
  * {@inheritdoc}
  */
 protected function initialize(InputInterface $input, OutputInterface $output)
 {
     parent::initialize($input, $output);
     Context::get('information-collector')->handleCommandInput($input);
     $this->getOutput()->writeBigTitle('Welcome to Release Management Tool');
     $this->executeActionListIfExist('prerequisites');
 }
Exemplo n.º 2
0
 /**
  * {@inheritdoc}
  */
 protected function initialize(InputInterface $input, OutputInterface $output)
 {
     parent::initialize($input, $output);
     $this->informationCollector->handleCommandInput($input);
     $this->getOutput()->writeBigTitle('Welcome to Release Management Tool initialization');
     $this->getOutput()->writeEmptyLine();
     // Security check for the config
     $configPath = $this->getApplication()->getConfigFilePath();
     if ($configPath !== null && file_exists($configPath) && $input->getOption('force') !== true) {
         throw new \Exception("A config file already exist ({$configPath}), if you want to regenerate it, use the --force option");
     }
     // Guessing elements path
     $this->buildPaths($configPath);
     // disable the creation of the conveniance script when within a phar
     if (extension_loaded('phar') && \Phar::running()) {
         $this->informationCollector->setValueFor('configonly', 'y');
     }
 }