From a2df8ccd4fde81c0ff6b1f0bb71e5cb6b92ae805 Mon Sep 17 00:00:00 2001 From: Kenneth Skovhede Date: Mon, 8 Apr 2013 22:19:42 +0200 Subject: [PATCH] Improved error message if the user forgets to type the target url --- Duplicati/CommandLine/Program.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Duplicati/CommandLine/Program.cs b/Duplicati/CommandLine/Program.cs index 5c8e79cc7..ce726d2c0 100644 --- a/Duplicati/CommandLine/Program.cs +++ b/Duplicati/CommandLine/Program.cs @@ -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);