From ac22a74f53153e110532558f1a049da174242184 Mon Sep 17 00:00:00 2001 From: Michaeljon Miller Date: Tue, 17 May 2022 09:31:49 -0700 Subject: [PATCH] issue-6: make "all" the default for modules" --- Modules/ModuleFactory.cs | 2 +- Utils/CliOptions.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 6a4a7f0..3c6422b 100644 --- a/Utils/CliOptions.cs +++ b/Utils/CliOptions.cs @@ -31,7 +31,7 @@ public class CliOptions [Option('z', "zipped", Required = false, HelpText = "Assume input file is gzipped.")] public bool Zipped { get; set; } - [Option('m', "modules", Required = true, Min = 1, HelpText = "Space-separated list of modules to run, or 'all'.")] + [Option('m', "modules", Required = false, HelpText = "Space-separated list of modules to run, or 'all'.")] public IEnumerable ModuleNames { get; set; } public static CliOptions Settings