mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
CmdUndo: Converted from CLI to CLI2
This commit is contained in:
parent
f6f89ac333
commit
80052949d9
1 changed files with 2 additions and 3 deletions
|
@ -45,9 +45,8 @@ CmdUndo::CmdUndo ()
|
|||
int CmdUndo::execute (std::string& output)
|
||||
{
|
||||
// Detect attempts to modify the task.
|
||||
for (auto& a : context.cli._args)
|
||||
if (a.hasTag ("MODIFICATION"))
|
||||
throw std::string (STRING_CMD_UNDO_MODS);
|
||||
if (context.cli2.getWords ().size ())
|
||||
throw std::string (STRING_CMD_UNDO_MODS);
|
||||
|
||||
context.tdb2.revert ();
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue