mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Bug #761
- Fixed bug #761, in which the 'prepend' and 'append' commands failed to generate an error when no text was provided (thanks to Aikido Guy).
This commit is contained in:
parent
3f58e5a2ee
commit
8fa18d0da2
2 changed files with 8 additions and 0 deletions
|
@ -1946,6 +1946,9 @@ int handleModify (std::string& outs)
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
int handleAppend (std::string& outs)
|
||||
{
|
||||
if (!context.task.has ("description"))
|
||||
throw std::string ("Additional text must be provided.");
|
||||
|
||||
int rc = 0;
|
||||
int count = 0;
|
||||
std::stringstream out;
|
||||
|
@ -2027,6 +2030,9 @@ int handleAppend (std::string& outs)
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
int handlePrepend (std::string& outs)
|
||||
{
|
||||
if (!context.task.has ("description"))
|
||||
throw std::string ("Additional text must be provided.");
|
||||
|
||||
int rc = 0;
|
||||
int count = 0;
|
||||
std::stringstream out;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue