diff --git a/src/NetSparkle.Tools.AppCastGenerator/AppCastMaker.cs b/src/NetSparkle.Tools.AppCastGenerator/AppCastMaker.cs index 36565bd5..ffb380b2 100644 --- a/src/NetSparkle.Tools.AppCastGenerator/AppCastMaker.cs +++ b/src/NetSparkle.Tools.AppCastGenerator/AppCastMaker.cs @@ -296,7 +296,7 @@ public string GetPathToAppCastOutput(string desiredOutputDirectory, string sourc public (List, string) LoadAppCastItemsAndProductName(string sourceBinaryDirectory, bool useExistingAppCastItems, string outputAppCastFileName) { var items = new List(); - var dirFileSearches = GetSearchExtensionsFromString(_opts.Extensions); + var dirFileSearches = GetSearchExtensionsFromString(_opts.Extensions ?? ""); var binaries = FindBinaries(sourceBinaryDirectory, dirFileSearches, _opts.SearchBinarySubDirectories); if (!binaries.Any()) { @@ -382,14 +382,17 @@ public string GetPathToAppCastOutput(string desiredOutputDirectory, string sourc items.Sort((a, b) => b.Version.CompareTo(a.Version)); // mark critical items as critical - var criticalVersions = _opts.CriticalVersions.Split(",").ToList() + var criticalVersions = _opts.CriticalVersions?.Split(",").ToList() .Where(x => !string.IsNullOrWhiteSpace(x)) .Distinct(); - foreach (var item in items) + if (criticalVersions != null) { - if (criticalVersions.Contains(item.Version)) + foreach (var item in items) { - item.IsCriticalUpdate = true; + if (criticalVersions.Contains(item.Version)) + { + item.IsCriticalUpdate = true; + } } }