Improved error message if the user forgets to type the target url

This commit is contained in:
Kenneth Skovhede
2013-04-09 21:37:57 +02:00
parent 3bd1fc8b21
commit a2df8ccd4f
+7 -1
View File
@@ -128,7 +128,13 @@ namespace Duplicati.CommandLine
if (cargs.Count < 2 || cargs[0].Trim().Equals("help", StringComparison.InvariantCultureIgnoreCase))
{
if (cargs.Count < 2)
if (cargs.Count == 1 && !cargs[0].Trim().Equals("help", StringComparison.InvariantCultureIgnoreCase) )
{
PrintWrongNumberOfArguments(cargs, 2);
return 200;
}
if (cargs.Count < 2)
Help.PrintUsage("help", options);
else
Help.PrintUsage(cargs[1], options);