Skip to content

Commit 194b401

Browse files
Fix CI meta-test for AutoUpdater serialization
1 parent f2a8b84 commit 194b401

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/UniGetUI/AutoUpdater.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ public partial class AutoUpdater
3939
"50f753333811ff11f1920274afde3ffd4468b210",
4040
];
4141

42+
private static readonly AutoUpdaterJsonContext ProductInfoJsonContext = new(SerializationHelpers.DefaultOptions);
43+
4244
public static Window Window = null!;
4345
public static InfoBar Banner = null!;
4446
//------------------------------------------------------------------------------------------------------------------
@@ -208,7 +210,7 @@ private static async Task<UpdateCandidate> CheckForUpdatesFromProductInfo(Update
208210
Dictionary<string, ProductInfoProduct>? productInfoRoot = JsonSerializer.Deserialize(
209211
productInfo,
210212
typeof(Dictionary<string, ProductInfoProduct>),
211-
AutoUpdaterJsonContext.Default) as Dictionary<string, ProductInfoProduct>;
213+
ProductInfoJsonContext) as Dictionary<string, ProductInfoProduct>;
212214
if (productInfoRoot is null || productInfoRoot.Count == 0)
213215
{
214216
throw new FormatException("productinfo.json content is empty or invalid");

0 commit comments

Comments
 (0)