hyprctl: allow parsing empty value

fixes #7821
This commit is contained in:
Vaxry 2024-09-17 11:24:54 +01:00
parent 9e35656244
commit e72ae6b25f
1 changed files with 3 additions and 3 deletions

View File

@ -987,9 +987,9 @@ std::string dispatchKeyword(eHyprCtlOutputFormat format, std::string in) {
const auto COMMAND = in.substr(0, secondSpacePos); const auto COMMAND = in.substr(0, secondSpacePos);
const auto VALUE = in.substr(secondSpacePos + 1); const auto VALUE = in.substr(secondSpacePos + 1);
// If either COMMAND or VALUE is empty, handle accordingly // If COMMAND is empty, handle accordingly
if (COMMAND.empty() || VALUE.empty()) if (COMMAND.empty())
return "Invalid input: command or value is empty"; return "Invalid input: command is empty";
std::string retval = g_pConfigManager->parseKeyword(COMMAND, VALUE); std::string retval = g_pConfigManager->parseKeyword(COMMAND, VALUE);