Skip to content

Commit

Permalink
fix is_cli module load error
Browse files Browse the repository at this point in the history
  • Loading branch information
aviggngyv committed Dec 22, 2017
1 parent ee5a8c8 commit 8874865
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion core/lib/Hunter/App/ModuleHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,11 @@ public function getModuleDirectories() {
*/
public function getName($module) {
if(isset($this->moduleList[$module])){
$info = Yaml::decode(file_get_contents($this->moduleList[$module]->getPathname()));
if(is_cli()){
$info = Yaml::decode(file_get_contents(base_path().$this->moduleList[$module]->getPathname()));
}else {
$info = Yaml::decode(file_get_contents($this->moduleList[$module]->getPathname()));
}
}
return isset($info['name']) ? $info['name'] : $module;
}
Expand Down

0 comments on commit 8874865

Please sign in to comment.