mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
CmdContext: Report context as not found if nothing was deleted
This commit is contained in:
parent
1bba59e972
commit
c701137313
1 changed files with 2 additions and 0 deletions
|
@ -228,6 +228,8 @@ void CmdContext::deleteContext (const std::vector <std::string>& words, std::str
|
|||
// and 2 (not found) are aceptable return values from unsetConfigVariable
|
||||
if (rc % 2 != 0)
|
||||
throw format ("Context '{1}' not deleted.", words[1]);
|
||||
else if (rc == 6)
|
||||
throw format ("Context '{1}' not found.", words[1]);
|
||||
|
||||
out << format ("Context '{1}' deleted.\n", words[1]);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue