Skip to content

Commit

Permalink
Fixing repo_root path.
Browse files Browse the repository at this point in the history
  • Loading branch information
grasmash committed Jun 5, 2017
1 parent 35cacd7 commit d9a3f1b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
7 changes: 5 additions & 2 deletions src/Robo/Commands/Blt/DoctorCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,12 @@ public function doctor() {
protected function executeDoctorInsideVm() {
$drupal_vm_config_filepath = $this->getConfigValue('repo.root') . '/box/config.yml';
$drupal_vm_config = Yaml::parse(file_get_contents($drupal_vm_config_filepath));
$repo_root = $drupal_vm_config['drupal_core_path'];
$repo_root = $drupal_vm_config['drupal_core_path'] . '/..';
if (strstr($repo_root, '{{')) {
throw new \Exception("The value of drupal_core_path in $drupal_vm_config_filepath contains an unresolved Ansible variable. Please do not use Ansible variable placeholders for drupal_core_path. BLT cannot resolve them.");
$this->logger->error("The value of drupal_core_path in $drupal_vm_config_filepath contains an unresolved Ansible variable.");
$this->logger->error("Do not use Ansible variable placeholders for drupal_core_path.");
$this->logger->error("drupal_core_path is currently $drupal_vm_config_filepath. Please correct it.");
throw new \Exception("Unparsable value in $drupal_vm_config_filepath.");
}

$this->say("Drupal VM was detected. Running blt doctor inside of VM...");
Expand Down
6 changes: 3 additions & 3 deletions src/Robo/Hooks/CommandEventHook.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@ protected function escapeShellArg($arg) {
* TRUE if it should be invoked inside of Drupal VM.
*/
protected function shouldExecuteInDrupalVm() {
return $this->getInspector()->isDrupalVmLocallyInitialized()
&& $this->getInspector()->isDrupalVmBooted()
&& !$this->getInspector()->isVmCli();
return !$this->getInspector()->isVmCli() &&
$this->getInspector()->isDrupalVmLocallyInitialized()
&& $this->getInspector()->isDrupalVmBooted();
}

}

0 comments on commit d9a3f1b

Please sign in to comment.