Skip to content

Commit 965c2e8

Browse files
Fix a CS8600 (#144)
The cast to JsonValue could conceivably fail, but JsonValue.Create is well annotated.
1 parent a1a0bb4 commit 965c2e8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Microsoft.NET.Build.Containers/Image.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ private JsonObject CreateLabelMap()
9999
return container;
100100
}
101101

102-
static JsonArray ToJsonArray(string[] items) => new JsonArray(items.Where(s => !string.IsNullOrEmpty(s)).Select(s => (JsonValue)s).ToArray());
102+
static JsonArray ToJsonArray(string[] items) => new JsonArray(items.Where(s => !string.IsNullOrEmpty(s)).Select(s => JsonValue.Create(s)).ToArray());
103103

104104
public void SetEntrypoint(string[] executableArgs, string[]? args = null)
105105
{

0 commit comments

Comments
 (0)