diff options
author | Vaxry <[email protected]> | 2023-12-06 21:23:29 +0000 |
---|---|---|
committer | Vaxry <[email protected]> | 2023-12-06 23:31:04 +0000 |
commit | 07df71b43036b11d495f7ef3177c8797f128a1b9 (patch) | |
tree | c5867f5b8bf18b2eb06697c980eb33843ada16e2 | |
parent | c16f1497187676c11a8769cdf49ca37c677d1881 (diff) | |
download | Hyprland-07df71b43036b11d495f7ef3177c8797f128a1b9.tar.gz Hyprland-07df71b43036b11d495f7ef3177c8797f128a1b9.zip |
find branch too
-rw-r--r-- | hyprpm/src/core/PluginManager.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/hyprpm/src/core/PluginManager.cpp b/hyprpm/src/core/PluginManager.cpp index 080a0bd1..556a1082 100644 --- a/hyprpm/src/core/PluginManager.cpp +++ b/hyprpm/src/core/PluginManager.cpp @@ -274,6 +274,9 @@ bool CPluginManager::updateHeaders() { std::string hlcommit = HLVERCALL.substr(HLVERCALL.find("at commit") + 10); hlcommit = hlcommit.substr(0, hlcommit.find_first_of(' ')); + std::string hlbranch = HLVERCALL.substr(HLVERCALL.find("from branch") + 12); + hlbranch = hlbranch.substr(0, hlbranch.find(" at commit ")); + if (!std::filesystem::exists("/tmp/hyprpm")) { std::filesystem::create_directory("/tmp/hyprpm"); std::filesystem::permissions("/tmp/hyprpm", std::filesystem::perms::all, std::filesystem::perm_options::replace); @@ -310,7 +313,7 @@ bool CPluginManager::updateHeaders() { progress.m_szCurrentMessage = "Checking out sources"; progress.print(); - ret = execAndGet("cd /tmp/hyprpm/hyprland && git reset --hard --recurse-submodules " + hlcommit); + ret = execAndGet("cd /tmp/hyprpm/hyprland && git checkout " + hlbranch + " && git reset --hard --recurse-submodules " + hlcommit); progress.printMessageAbove(std::string{Colors::GREEN} + "✔" + Colors::RESET + " checked out to running ver"); progress.m_iSteps = 3; |