private function loadModule(InstallInfo $installInfo)
    {
        $installPath = Path::makeAbsolute($installInfo->getInstallPath(), $this->rootDir);
        $moduleFile = null;
        $loadError = null;

        // Catch and log exceptions so that single modules cannot break
        // the whole repository
        try {
            $moduleFile = $this->loadModuleFile($installPath);
        } catch (InvalidConfigException $loadError) {
        } catch (UnsupportedVersionException $loadError) {
        } catch (FileNotFoundException $loadError) {
        } catch (NoDirectoryException $loadError) {
        }

        $loadErrors = $loadError ? array($loadError) : array();

        return new Module($moduleFile, $installPath, $installInfo, $loadErrors);
    }