use repo name from manifest if available

This commit is contained in:
Vaxry 2023-12-06 19:28:40 +00:00
parent 148ea16732
commit 51fb8686ab

View file

@ -162,7 +162,7 @@ bool CPluginManager::addNewPluginRepo(const std::string& url) {
std::string repohash = execAndGet("cd /tmp/hyprpm/new/ && git rev-parse HEAD"); std::string repohash = execAndGet("cd /tmp/hyprpm/new/ && git rev-parse HEAD");
if (repohash.length() > 0) if (repohash.length() > 0)
repohash.pop_back(); repohash.pop_back();
repo.name = url.substr(url.find_last_of('/') + 1); repo.name = pManifest->m_sRepository.name.empty() ? url.substr(url.find_last_of('/') + 1) : pManifest->m_sRepository.name;
repo.url = url; repo.url = url;
repo.hash = repohash; repo.hash = repohash;
for (auto& p : pManifest->m_vPlugins) { for (auto& p : pManifest->m_vPlugins) {