/** * Prepare a directory for installation by the `vagrant` user. * * @return boolean True if successful * @throws Cake\Core\Exception\Exception */ protected function _prepareDirectory() { if (!CakeboxUtility::dirAvailable($this->options['path'])) { throw new Exception("Target directory did not pass readiness tests."); } if (!is_dir($this->options['path'])) { Log::debug("Creating target directory " . $this->options['path']); if (!$this->Execute->mkVagrantDir($this->options['path'])) { throw new Exception("Error creating target directory " . $this->options['path']); } } return true; }