summaryrefslogtreecommitdiff
path: root/hyprpm/src/core/PluginManager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'hyprpm/src/core/PluginManager.cpp')
-rw-r--r--hyprpm/src/core/PluginManager.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/hyprpm/src/core/PluginManager.cpp b/hyprpm/src/core/PluginManager.cpp
index 15ce87f7..a29afad7 100644
--- a/hyprpm/src/core/PluginManager.cpp
+++ b/hyprpm/src/core/PluginManager.cpp
@@ -464,8 +464,18 @@ bool CPluginManager::updateHeaders(bool force) {
progress.m_szCurrentMessage = "Checking out sources";
progress.print();
+ if (m_bVerbose)
+ progress.printMessageAbove(std::string{Colors::BLUE} + "[v] " + Colors::RESET + "will run: " + "cd " + WORKINGDIR + " && git checkout " + HLVER.hash + " 2>&1");
+
ret = execAndGet("cd " + WORKINGDIR + " && git checkout " + HLVER.hash + " 2>&1");
+ if (ret.contains("fatal: unable to read tree")) {
+ std::cerr << "\n"
+ << Colors::RED << "✖" << Colors::RESET
+ << " Could not checkout the running Hyprland commit. If you are on -git, try updating.\nYou can also try re-running hyprpm update with --no-shallow.\n";
+ return false;
+ }
+
if (m_bVerbose)
progress.printMessageAbove(std::string{Colors::BLUE} + "[v] " + Colors::RESET + "git returned (co): " + ret);