Skip to content

Commit

Permalink
Check for missing 'type'.
Browse files Browse the repository at this point in the history
  • Loading branch information
yunosh committed Oct 20, 2017
1 parent 852e115 commit edd7bb0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/Horde/Pear/Package/Type/HordeSplit.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ public function getType()
throw new Horde_Pear_Exception('Cannot find the horde.yml file.');
}
$yml = Horde_Yaml::loadFile($this->getRootPath() . '/.horde.yml');
if (!isset($yml['type'])) {
throw new Horde_Pear_Exception('Missing type in ' . $this->getRootPath() . '/.horde.yml');
}
return ($yml['type'] == 'application') ? 'Application' : 'Component';
}

Expand Down

0 comments on commit edd7bb0

Please sign in to comment.