diff options
| author | Vaxry <vaxry@vaxry.net> | 2024-07-30 12:05:23 +0200 |
|---|---|---|
| committer | Vaxry <vaxry@vaxry.net> | 2024-07-30 12:05:23 +0200 |
| commit | 68ee4dda5e4f4ce719bc814b873deca73f3d5eba (patch) | |
| tree | 89e1bea3e6e31cc7daaa7fdae9eb56572272404a /hyprpm/src/core/PluginManager.cpp | |
| parent | 743e98f0c0c2de63a0715f7112dade3a819a8307 (diff) | |
hyprpm: warn about uncheckoutable commits
Diffstat (limited to 'hyprpm/src/core/PluginManager.cpp')
| -rw-r--r-- | hyprpm/src/core/PluginManager.cpp | 10 |
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); |
