hyprpm: add --force for update

closes #4547
This commit is contained in:
Vaxry
2024-01-28 02:04:35 +00:00
parent bfcc2adbda
commit 352574d862
3 changed files with 10 additions and 6 deletions

View File

@@ -316,7 +316,7 @@ eHeadersErrors CPluginManager::headersValid() {
return HEADERS_OK;
}
bool CPluginManager::updateHeaders() {
bool CPluginManager::updateHeaders(bool force) {
const auto HLVER = getHyprlandVersion();
@@ -325,7 +325,7 @@ bool CPluginManager::updateHeaders() {
std::filesystem::permissions("/tmp/hyprpm", std::filesystem::perms::all, std::filesystem::perm_options::replace);
}
if (headersValid() == HEADERS_OK) {
if (!force && headersValid() == HEADERS_OK) {
std::cout << "\n" << std::string{Colors::GREEN} + "" + Colors::RESET + " Your headers are already up-to-date.\n";
auto GLOBALSTATE = DataState::getGlobalState();
GLOBALSTATE.headersHashCompiled = HLVER.hash;