mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
parent
496773b386
commit
5e5a48606f
1 changed files with 9 additions and 1 deletions
|
@ -49,7 +49,15 @@ CmdExec::CmdExec ()
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
int CmdExec::execute (std::string&)
|
int CmdExec::execute (std::string&)
|
||||||
{
|
{
|
||||||
return system (join (" ", Context::getContext ().cli2.getWords ()).c_str ());
|
std::string command = join (" ", Context::getContext ().cli2.getWords ());
|
||||||
|
|
||||||
|
if (command.empty())
|
||||||
|
{
|
||||||
|
Context::getContext ().error ("Cannot execute an empty command.");
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return system (command.c_str ());
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue