Skip to content

Commit

Permalink
test: added tests for update with version=null
Browse files Browse the repository at this point in the history
  • Loading branch information
iadonkey committed Sep 18, 2024
1 parent b53abbf commit dfed942
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion TwinpackCore/Core/TwinpackService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ public async System.Threading.Tasks.Task<List<PackageItem>> UpdatePackagesAsync(
var i = filters.Packages != null && package.Package.Name != null ? Array.IndexOf(filters.Packages, package.Package.Name) : -1;
if (i >= 0)
{
package.Config.Version = filters.Versions?.ElementAtOrDefault(i);
package.Config.Version = string.IsNullOrEmpty(filters.Versions?.ElementAtOrDefault(i)) ? null : filters.Versions?.ElementAtOrDefault(i);
package.Config.Branch = filters.Branches?.ElementAtOrDefault(i) ?? (string.IsNullOrEmpty(package.Config.Version) ? package.Config.Branch : null);
package.Config.Configuration = filters.Configurations?.ElementAtOrDefault(i) ?? (string.IsNullOrEmpty(package.Config.Version) ? package.Config.Configuration : null);
package.Config.Target = filters.Targets?.ElementAtOrDefault(i) ?? (string.IsNullOrEmpty(package.Config.Version) ? package.Config.Target : null);
Expand Down

0 comments on commit dfed942

Please sign in to comment.