mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
timew: Moved more code inside the try block
This commit is contained in:
parent
11315e4f56
commit
c67b09f721
1 changed files with 17 additions and 17 deletions
|
@ -43,25 +43,25 @@ int main (int argc, const char** argv)
|
||||||
if (lightweightVersionCheck (argc, argv))
|
if (lightweightVersionCheck (argc, argv))
|
||||||
return status;
|
return status;
|
||||||
|
|
||||||
// Add entities so that command line tokens such as 'help' are recognized as
|
|
||||||
// commands.
|
|
||||||
CLI cli;
|
|
||||||
initializeEntities (cli);
|
|
||||||
|
|
||||||
// Capture the args.
|
|
||||||
std::string commandLine;
|
|
||||||
for (int i = 0; i < argc; i++)
|
|
||||||
{
|
|
||||||
cli.add (argv[i]);
|
|
||||||
|
|
||||||
if (i)
|
|
||||||
commandLine += " ";
|
|
||||||
|
|
||||||
commandLine += quoteIfNeeded (argv[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
// Add entities so that command line tokens such as 'help' are recognized as
|
||||||
|
// commands.
|
||||||
|
CLI cli;
|
||||||
|
initializeEntities (cli);
|
||||||
|
|
||||||
|
// Capture the args.
|
||||||
|
std::string commandLine;
|
||||||
|
for (int i = 0; i < argc; i++)
|
||||||
|
{
|
||||||
|
cli.add (argv[i]);
|
||||||
|
|
||||||
|
if (i)
|
||||||
|
commandLine += " ";
|
||||||
|
|
||||||
|
commandLine += quoteIfNeeded (argv[i]);
|
||||||
|
}
|
||||||
|
|
||||||
// Scan command line.
|
// Scan command line.
|
||||||
cli.analyze ();
|
cli.analyze ();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue