diff options
| author | vaxerski <vaxry@vaxry.net> | 2025-06-01 21:53:20 +0200 |
|---|---|---|
| committer | vaxerski <vaxry@vaxry.net> | 2025-06-01 21:53:30 +0200 |
| commit | 82b854954230a45d590c1287a8c2c1f0076f3392 (patch) | |
| tree | 14185650df37ceaee9e4370ec31cd5e9629f078c /hyprpm/src/core/PluginManager.cpp | |
| parent | 69c2b2926e128f1fd09080aed43944987a42026f (diff) | |
hyprpm: refuse adding a new repo without update
Diffstat (limited to 'hyprpm/src/core/PluginManager.cpp')
| -rw-r--r-- | hyprpm/src/core/PluginManager.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/hyprpm/src/core/PluginManager.cpp b/hyprpm/src/core/PluginManager.cpp index 90eba579..b7316fdb 100644 --- a/hyprpm/src/core/PluginManager.cpp +++ b/hyprpm/src/core/PluginManager.cpp @@ -159,6 +159,11 @@ bool CPluginManager::addNewPluginRepo(const std::string& url, const std::string& DataState::updateGlobalState(GLOBALSTATE); } + if (GLOBALSTATE.headersHashCompiled.empty()) { + std::println("\n{}", failureString("Cannot find headers in the global state. Try running hyprpm update first.")); + return false; + } + std::cout << Colors::GREEN << "✔" << Colors::RESET << Colors::RED << " adding a new plugin repository " << Colors::RESET << "from " << url << "\n " << Colors::RED << "MAKE SURE" << Colors::RESET << " that you trust the authors. " << Colors::RED << "DO NOT" << Colors::RESET << " install random plugins without verifying the code and author.\n " |
