public function execute(InputInterface $input, OutputInterface $output) { $command = $this->executable() . ' ' . europa_path() . '/Europa.yaml'; $process = new Process($command, realpath(__DIR__ . '/../'), array_merge($_SERVER, $_ENV), null, null); $process->run(function ($type, $line) use($output) { $output->write($line); }); }
public function execute(InputInterface $input, OutputInterface $output) { if (is_dir(europa_path())) { throw new \InvalidArgumentException('Europa has already been setup'); } mkdir(europa_path()); $output->writeln('<comment>Setting up a sweet config file...</comment> <info>✔</info>'); copy(__DIR__ . '/stubs/Europa.yaml', europa_path() . '/Europa.yaml'); $output->writeln('<comment>Europa.yaml file created at:</comment> ' . europa_path() . '/Europa.yaml'); $output->writeln('<comment>Giving you some aliases...</comment> <info>✔</info>'); copy(__DIR__ . '/stubs/aliases', europa_path() . '/aliases'); $output->writeln('<comment>You\'re all covered. aliases file created at:</comment> ' . europa_path() . '/aliases'); }