diff --git a/UnoCheck/CheckCommand.cs b/UnoCheck/CheckCommand.cs index efa8db4..f9eac4b 100644 --- a/UnoCheck/CheckCommand.cs +++ b/UnoCheck/CheckCommand.cs @@ -106,7 +106,7 @@ public override async Task ExecuteAsync(CommandContext context, CheckSettin settings.TargetPlatforms = ParseTfmsToTargetPlatforms(settings); if (!string.IsNullOrEmpty(settings.Ide)) { - var currentSkips = settings.Skip.ToList(); + var currentSkips = settings.Skip == null ? [] : settings.Skip.ToList(); switch (settings.Ide.ToLowerInvariant()) { case "rider": diff --git a/UnoCheck/CheckSettings.cs b/UnoCheck/CheckSettings.cs index 1429ef1..2cf7fd7 100644 --- a/UnoCheck/CheckSettings.cs +++ b/UnoCheck/CheckSettings.cs @@ -1,4 +1,5 @@ -using Spectre.Console.Cli; +#nullable enable +using Spectre.Console.Cli; using System.ComponentModel; namespace DotNetCheck @@ -15,7 +16,7 @@ public partial class CheckSettings : CommandSettings, IManifestChannelSettings public bool NonInteractive { get; set; } [CommandOption("-s|--skip ")] - public string[] Skip { get; set; } + public string[]? Skip { get; set; } [CommandOption("--pre|--preview|-d|--dev")] public bool Preview { get; set; }