src/Robo/Commands/Vm/VmCommand.php
public function vm($options = ['no-boot' => FALSE]) {
    if (!$this->getInspector()->isDrupalVmConfigPresent()) {
      $confirm = $this->confirm("Drupal VM is not currently installed. Install it now? ", TRUE);
      if ($confirm) {
        $this->install();
      }
      else {
        return FALSE;
      }
    }

    // @todo Check that VM is properly configured, e.g., all config files exist
    // and geerlingguy/drupalvm is in composer.lock.
    if (!$this->getInspector()->isDrupalVmLocallyInitialized()) {
      $this->localInitialize();
    }
    else {
      $this->say("Drupal VM is already configured. In the future, please use vagrant commands to interact directly with the VM.");
    }

    if (!$options['no-boot'] && !$this->getInspector()->isDrupalVmBooted()) {
      return $this->boot();
    }
  }
public function vm($options = ['no-boot' => FALSE]) {
    if (!$this->getInspector()->isDrupalVmConfigPresent()) {
      $confirm = $this->confirm("Drupal VM is not currently installed. Install it now? ", TRUE);
      if ($confirm) {
        $this->install();
      }
      else {
        return FALSE;
      }
    }

    // @todo Check that VM is properly configured, e.g., all config files exist
    // and geerlingguy/drupalvm is in composer.lock.
    if (!$this->getInspector()->isDrupalVmLocallyInitialized()) {
      $this->localInitialize();
    }
    else {
      $this->say("Drupal VM is already configured. In the future, please use vagrant commands to interact directly with the VM.");
    }

    if (!$options['no-boot'] && !$this->getInspector()->isDrupalVmBooted()) {
      return $this->boot();
    }
  }
public function vm ( $ options = [ 'no-boot' => FALSE ] ) { if ( ! $ this -> getInspector ( ) -> isDrupalVmConfigPresent ( ) ) { $ confirm = $ this -> confirm ( "Drupal VM is not currently installed. Install it now? " , TRUE ) ; if ( $ confirm ) { $ this -> install ( ) ; } else { return FALSE ; } } // @todo Check that VM is properly configured, e.g., all config files exist // and geerlingguy/drupalvm is in composer.lock. if ( ! $ this -> getInspector ( ) -> isDrupalVmLocallyInitialized ( ) ) { $ this -> localInitialize ( ) ; } else { $ this -> say ( "Drupal VM is already configured. In the future, please use vagrant commands to interact directly with the VM." ) ; } if ( ! $ options [ 'no-boot' ] && ! $ this -> getInspector ( ) -> isDrupalVmBooted ( ) ) { return $ this -> boot ( ) ; } }
Configures and boots a Drupal VM.

@command recipes:drupalvm:init

@aliases rdi vm

@options no-boot

@throws \Exception
Configures and boots a Drupal VM .