Exemplo n.º 1
0
 /**
  * Execute the command.
  *
  * @param  \Symfony\Component\Console\Input\InputInterface  $input
  * @param  \Symfony\Component\Console\Output\OutputInterface  $output
  * @return void
  */
 public function execute(InputInterface $input, OutputInterface $output)
 {
     $command = $this->executable() . ' ' . solder_path() . '/Solder.json';
     $process = new Process($command, realpath(__DIR__ . '/../'), null, null, null);
     $process->run(function ($type, $line) use($output) {
         $output->write($line);
     });
 }
Exemplo n.º 2
0
 /**
  * Execute the command.
  *
  * @param  \Symfony\Component\Console\Input\InputInterface  $input
  * @param  \Symfony\Component\Console\Output\OutputInterface  $output
  * @return void
  */
 public function execute(InputInterface $input, OutputInterface $output)
 {
     if (is_dir(solder_path())) {
         throw new \InvalidArgumentException("Solder has already been initialized.");
     }
     $output->writeln('<comment>Creating Solder.json file...</comment> <info>✔</info>');
     mkdir(solder_path());
     copy(__DIR__ . '/stubs/Solder.json', solder_path() . '/Solder.json');
     $output->writeln('<comment>Solder.yaml file created at:</comment> ' . solder_path() . '/Solder.json');
 }