aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorVaxry <[email protected]>2023-12-06 22:52:59 +0000
committerVaxry <[email protected]>2023-12-06 23:31:04 +0000
commited4a13a7676b3be7593a2857b338c2d5c697e313 (patch)
tree7adbde5a2ed47b49ef1ba971dd0cc55c3f409aa6
parent8a99b94e76ea3688b5f709802f28994ae9bf2b89 (diff)
downloadHyprland-ed4a13a7676b3be7593a2857b338c2d5c697e313.tar.gz
Hyprland-ed4a13a7676b3be7593a2857b338c2d5c697e313.zip
log return of git
-rw-r--r--hyprpm/src/core/PluginManager.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/hyprpm/src/core/PluginManager.cpp b/hyprpm/src/core/PluginManager.cpp
index eddae21c..4071ede6 100644
--- a/hyprpm/src/core/PluginManager.cpp
+++ b/hyprpm/src/core/PluginManager.cpp
@@ -28,6 +28,13 @@ std::string execAndGet(std::string cmd) {
}
SHyprlandVersion CPluginManager::getHyprlandVersion() {
+ static SHyprlandVersion ver;
+ static bool once = false;
+
+ if (once)
+ return ver;
+
+ once = true;
const auto HLVERCALL = execAndGet("hyprctl version");
if (m_bVerbose)
std::cout << Colors::BLUE << "[v] " << Colors::RESET << "version returned: " << HLVERCALL << "\n";
@@ -46,7 +53,8 @@ SHyprlandVersion CPluginManager::getHyprlandVersion() {
if (m_bVerbose)
std::cout << Colors::BLUE << "[v] " << Colors::RESET << "parsed commit " << hlcommit << " at branch " << hlbranch << "\n";
- return SHyprlandVersion{hlbranch, hlcommit};
+ ver = SHyprlandVersion{hlbranch, hlcommit};
+ return ver;
}
bool CPluginManager::addNewPluginRepo(const std::string& url) {
@@ -336,6 +344,9 @@ bool CPluginManager::updateHeaders() {
ret =
execAndGet("cd /tmp/hyprpm/hyprland && git checkout " + HLVER.branch + " 2>&1 && git submodule update --init 2>&1 && git reset --hard --recurse-submodules " + HLVER.hash);
+ if (m_bVerbose)
+ progress.printMessageAbove(std::string{Colors::BLUE} + "[v] " + Colors::RESET + "git returned: " + ret);
+
progress.printMessageAbove(std::string{Colors::GREEN} + "✔" + Colors::RESET + " checked out to running ver");
progress.m_iSteps = 3;
progress.m_szCurrentMessage = "Building Hyprland";