diff options
author | Vaxry <[email protected]> | 2024-04-15 01:57:04 +0100 |
---|---|---|
committer | Vaxry <[email protected]> | 2024-04-15 01:57:10 +0100 |
commit | ce4c36392da5dd23d2893546c6a5d6681b72dcec (patch) | |
tree | 90c3ea6406ffbf8f68180d0394933172e7ce981a /hyprpm | |
parent | 67f47fbdccd639502a76ccb3552a23df37f19ef8 (diff) | |
download | Hyprland-ce4c36392da5dd23d2893546c6a5d6681b72dcec.tar.gz Hyprland-ce4c36392da5dd23d2893546c6a5d6681b72dcec.zip |
hyprpm: minor fixes to hyprpm for shallow and versioned clones
Diffstat (limited to 'hyprpm')
-rw-r--r-- | hyprpm/src/core/PluginManager.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/hyprpm/src/core/PluginManager.cpp b/hyprpm/src/core/PluginManager.cpp index 5dce21e5..6a752623 100644 --- a/hyprpm/src/core/PluginManager.cpp +++ b/hyprpm/src/core/PluginManager.cpp @@ -404,6 +404,11 @@ bool CPluginManager::updateHeaders(bool force) { std::string ret = execAndGet("cd /tmp/hyprpm && git clone --recursive https://github.com/hyprwm/hyprland hyprland --shallow-since='" + HLVER.date + "'"); if (!std::filesystem::exists("/tmp/hyprpm/hyprland")) { + progress.printMessageAbove(std::string{Colors::RED} + "✖" + Colors::RESET + " Clone failed. Retrying without shallow."); + ret = execAndGet("cd /tmp/hyprpm && git clone --recursive https://github.com/hyprwm/hyprland hyprland"); + } + + if (!std::filesystem::exists("/tmp/hyprpm/hyprland")) { std::cerr << "\n" << Colors::RED << "✖" << Colors::RESET << " Could not clone the hyprland repository. shell returned:\n" << ret << "\n"; return false; } @@ -598,7 +603,7 @@ bool CPluginManager::updatePlugins(bool forceUpdateAll) { for (auto& p : pManifest->m_vPlugins) { std::string out; - if (p.since > HLVER.commits && HLVER.commits >= 1 /* for --depth 1 clones, we can't check this. */) { + if (p.since > HLVER.commits && HLVER.commits >= 1000 /* for shallow clones, we can't check this. 1000 is an arbitrary number I chose. */) { progress.printMessageAbove(std::string{Colors::RED} + "✖" + Colors::RESET + " Not building " + p.name + ": your Hyprland version is too old.\n"); p.failed = true; continue; |