mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-10 05:26:00 +01:00
hyprpm: add short error code explanations
This commit is contained in:
parent
e673220340
commit
743e98f0c0
2 changed files with 15 additions and 1 deletions
|
@ -529,7 +529,8 @@ bool CPluginManager::updateHeaders(bool force) {
|
||||||
|
|
||||||
std::cout << "\n";
|
std::cout << "\n";
|
||||||
} else {
|
} else {
|
||||||
progress.printMessageAbove(std::string{Colors::RED} + "✖" + Colors::RESET + " failed to install headers with error code " + std::to_string((int)HEADERSVALID));
|
progress.printMessageAbove(std::string{Colors::RED} + "✖" + Colors::RESET + " failed to install headers with error code " + std::to_string((int)HEADERSVALID) + " (" +
|
||||||
|
headerErrorShort(HEADERSVALID) + ")");
|
||||||
progress.m_iSteps = 5;
|
progress.m_iSteps = 5;
|
||||||
progress.m_szCurrentMessage = "Failed";
|
progress.m_szCurrentMessage = "Failed";
|
||||||
progress.print();
|
progress.print();
|
||||||
|
@ -880,6 +881,18 @@ std::string CPluginManager::headerError(const eHeadersErrors err) {
|
||||||
return std::string{Colors::RED} + "✖" + Colors::RESET + " Unknown header error. Please run hyprpm update to fix those.\n";
|
return std::string{Colors::RED} + "✖" + Colors::RESET + " Unknown header error. Please run hyprpm update to fix those.\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string CPluginManager::headerErrorShort(const eHeadersErrors err) {
|
||||||
|
switch (err) {
|
||||||
|
case HEADERS_CORRUPTED: return "Headers corrupted";
|
||||||
|
case HEADERS_MISMATCHED: return "Headers version mismatched";
|
||||||
|
case HEADERS_NOT_HYPRLAND: return "Not running on Hyprland";
|
||||||
|
case HEADERS_MISSING: return "Headers missing";
|
||||||
|
case HEADERS_DUPLICATED: return "Headers duplicated";
|
||||||
|
default: break;
|
||||||
|
}
|
||||||
|
return "?";
|
||||||
|
}
|
||||||
|
|
||||||
bool CPluginManager::hasDeps() {
|
bool CPluginManager::hasDeps() {
|
||||||
std::vector<std::string> deps = {"meson", "cpio", "cmake"};
|
std::vector<std::string> deps = {"meson", "cpio", "cmake"};
|
||||||
for (auto& d : deps) {
|
for (auto& d : deps) {
|
||||||
|
|
|
@ -66,6 +66,7 @@ class CPluginManager {
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::string headerError(const eHeadersErrors err);
|
std::string headerError(const eHeadersErrors err);
|
||||||
|
std::string headerErrorShort(const eHeadersErrors err);
|
||||||
|
|
||||||
std::string m_szWorkingPluginDirectory = "";
|
std::string m_szWorkingPluginDirectory = "";
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue