Skip to content

Commit 1ae83e9

Browse files
committed
We need to support .NET 4.6.2
1 parent ee207e1 commit 1ae83e9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: build-tools/xaprepare/xaprepare/Steps/Step_InstallDotNetPreview.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,6 @@ async Task<bool> DownloadDotNetArchive (Context context, string archiveDestinati
115115

116116
(bool success, ulong size, HttpStatusCode status) = await Utilities.GetDownloadSizeWithStatus (archiveUrl);
117117
if (!success) {
118-
string message;
119118
if (status == HttpStatusCode.NotFound) {
120119
Log.ErrorLine ($"dotnet archive URL {archiveUrl} not found");
121120
} else {
@@ -199,14 +198,15 @@ async Task<bool> InstallDotNetAsync (Context context, string dotnetPath, string
199198
string scriptReply = Utilities.GetStringFromStdout (scriptCommand, scriptArgs);
200199
var archiveUrls = new List<string> ();
201200

201+
char[] fieldSplitChars = new char[] { ':' };
202202
foreach (string l in scriptReply.Split (new char[] { '\n' })) {
203203
string line = l.Trim ();
204204

205205
if (!line.StartsWith ("dotnet-install: URL #", StringComparison.OrdinalIgnoreCase)) {
206206
continue;
207207
}
208208

209-
string[] parts = line.Split (":", 3, StringSplitOptions.RemoveEmptyEntries);
209+
string[] parts = line.Split (fieldSplitChars, 3);
210210
if (parts.Length < 3) {
211211
Log.WarningLine ($"dotnet-install URL line has unexpected number of parts. Expected 3, got {parts.Length}");
212212
Log.WarningLine ($"Line: {line}");

0 commit comments

Comments
 (0)