From e1c42aac5b643cd3d78c6b5ed6914140815dcd50 Mon Sep 17 00:00:00 2001 From: Kenneth Skovhede Date: Sat, 31 Aug 2024 11:36:32 +0200 Subject: [PATCH] Add missing parenthesis that causes empty help output on Windows. --- Duplicati/Server/Program.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Duplicati/Server/Program.cs b/Duplicati/Server/Program.cs index 6405f9486..7c94197f2 100644 --- a/Duplicati/Server/Program.cs +++ b/Duplicati/Server/Program.cs @@ -847,12 +847,13 @@ namespace Duplicati.Server /// Gets a list of all supported commandline options /// public static Library.Interface.ICommandLineArgument[] SupportedCommands - => OperatingSystem.IsWindows() - ? [] - : new[] { + => (OperatingSystem.IsWindows() + ? new[] { new Duplicati.Library.Interface.CommandLineArgument(WINDOWS_EVENTLOG_OPTION, Duplicati.Library.Interface.CommandLineArgument.ArgumentType.Boolean, Strings.Program.LogwindowseventlogShort, Strings.Program.LogwindowseventlogLong), new Duplicati.Library.Interface.CommandLineArgument(WINDOWS_EVENTLOG_LEVEL_OPTION, Duplicati.Library.Interface.CommandLineArgument.ArgumentType.Enumeration, Strings.Program.LogwindowseventloglevelShort, Strings.Program.LogwindowseventloglevelLong, Library.Logging.LogMessageType.Information.ToString(), null, Enum.GetNames(typeof(Duplicati.Library.Logging.LogMessageType))) } + : [] + ) .Concat([ new Duplicati.Library.Interface.CommandLineArgument("tempdir", Duplicati.Library.Interface.CommandLineArgument.ArgumentType.Path, Strings.Program.TempdirShort, Strings.Program.TempdirLong, System.IO.Path.GetTempPath()), new Duplicati.Library.Interface.CommandLineArgument("help", Duplicati.Library.Interface.CommandLineArgument.ArgumentType.Boolean, Strings.Program.HelpCommandDescription, Strings.Program.HelpCommandDescription),