From e20108fe6f0ea5dd400fb3d56256e963c5fc28f2 Mon Sep 17 00:00:00 2001 From: Kenneth Skovhede Date: Sat, 24 Aug 2013 20:59:33 +0200 Subject: [PATCH] Bugfix for invoking CLI without parameters --- Duplicati/CommandLine/Program.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Duplicati/CommandLine/Program.cs b/Duplicati/CommandLine/Program.cs index 3b311d978..5eca180f5 100644 --- a/Duplicati/CommandLine/Program.cs +++ b/Duplicati/CommandLine/Program.cs @@ -147,8 +147,14 @@ namespace Duplicati.CommandLine return 100; } - string command = cargs[0]; - cargs.RemoveAt(0); + string command; + if (cargs.Count > 0) + { + command = cargs[0]; + cargs.RemoveAt(0); + } + else + command = "help"; if (!options.ContainsKey("passphrase")) if (!string.IsNullOrEmpty(System.Environment.GetEnvironmentVariable("PASSPHRASE")))