Skip to content

Commit 08101e2

Browse files
committed
fix: add nullability operator to variable splitting to prevent potential null reference exceptions
1 parent ea5d4b5 commit 08101e2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/testr.Cli/Domain/VariablesHelper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public static Dictionary<string, string> CreateVariables(
1313
}
1414

1515
return variables
16-
.Select(v => v.Split('='))
16+
.Select(v => v!.Split('='))
1717
.Where(parts => parts.Length == 2)
1818
.ToDictionary(parts => parts[0].Trim(), parts => parts[1].Trim());
1919
}

0 commit comments

Comments
 (0)