Example #1
0
 public function install()
 {
     if (!Console::commandExists('vagrant')) {
         return;
     }
     if (!$this->command->output->confirm('Would you like to provision the Vagrant environment?', true)) {
         return;
     }
     $this->command->output->writeln('<info>Starting Vagrant...</info>');
     $process = (new Process('vagrant up --provision', $this->command->path))->setTimeout(null);
     if ('\\' !== DIRECTORY_SEPARATOR && file_exists('/dev/tty') && is_readable('/dev/tty')) {
         $process->setTty(true);
     }
     $process->run(function ($type, $line) {
         $this->command->output->write($line);
     });
 }
Example #2
0
 public function install()
 {
     if (!Console::commandExists('vagrant')) {
         return;
     }
     if (!$this->command->output->confirm('Would you like to install the Vagrant plugins?', true)) {
         return;
     }
     $this->command->output->writeln('<info>Installing Vagrant plugins...</info>');
     $process = (new Process('vagrant plugin install vagrant-auto_network vagrant-cachier vagrant-hostmanager', $this->command->path))->setTimeout(null);
     if ('\\' !== DIRECTORY_SEPARATOR && file_exists('/dev/tty') && is_readable('/dev/tty')) {
         $process->setTty(true);
     }
     $process->run(function ($type, $line) {
         $this->command->output->write($line);
     });
 }
Example #3
0
 public function install()
 {
     if (!Console::commandExists('vagrant')) {
         return;
     }
     $vagrantBoxes = shell_exec('vagrant box list');
     if (!preg_match('/ubuntu\\/trusty64/', $vagrantBoxes)) {
         if (!$this->command->output->confirm('Would you like to add the Vagrant box?', true)) {
             return;
         }
         $this->command->output->writeln('<info>Adding Vagrant box...</info>');
         $process = (new Process('vagrant box add ubuntu/trusty64', $this->command->path))->setTimeout(null)->setTty($setTty);
         $process->run(function ($type, $line) {
             $this->command->output->write($line);
         });
     }
 }