diff --git a/Modules/ModuleFactory.cs b/Modules/ModuleFactory.cs index 13ea7b3..ed71320 100644 --- a/Modules/ModuleFactory.cs +++ b/Modules/ModuleFactory.cs @@ -21,7 +21,7 @@ public static class ModuleFactory public static IEnumerable Create(CliOptions settings) { - if (settings.ModuleNames.First() == "all") + if (settings.ModuleNames.Any() == false || settings.ModuleNames.First() == "all") { settings.ModuleNames = moduleMap.Keys; return moduleMap.Values; diff --git a/Utils/CliOptions.cs b/Utils/CliOptions.cs index a4b4a29..a5639c2 100644 --- a/Utils/CliOptions.cs +++ b/Utils/CliOptions.cs @@ -24,8 +24,8 @@ public class CliOptions [Option('f', "format", Required = true, HelpText = "Type of input file.")] public ReaderType Format { get; set; } - [Option('m', "modules", Required = true, Min = 1, HelpText = "Space-separated list of modules to run, or 'all'.")] - public IEnumerable ModuleNames { get; set; } = Array.Empty(); + [Option('m', "modules", Required = false, HelpText = "Space-separated list of modules to run, or 'all'.")] + public IEnumerable ModuleNames { get; set; } public static CliOptions Settings { get; set; } = null!;