Skip to content

Commit 5963e0d

Browse files
authored
Fix install and update of nanoclr (#220)
***NO_CI***
1 parent e6201c4 commit 5963e0d

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

source/TestAdapter/NanoCLRHelper.cs

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,8 @@ public static bool InstallNanoClr(LogMessenger logger)
9393
{
9494
logger.LogMessage($"No need to update. Running v{latestPackageVersion}",
9595
Settings.LoggingLevel.Verbose);
96+
97+
performInstallUpdate = false;
9698
}
9799
}
98100
else
@@ -137,7 +139,7 @@ public static bool InstallNanoClr(LogMessenger logger)
137139
}
138140
else
139141
{
140-
logger.LogPanicMessage($"*** Failed to install/update nanoclr. {cliResult.StandardOutput}.");
142+
logger.LogPanicMessage($"*** Failed to install/update nanoclr *** {Environment.NewLine} {cliResult.StandardOutput}");
141143

142144
NanoClrIsInstalled = false;
143145
}
@@ -193,30 +195,30 @@ public static void UpdateNanoCLRInstance(
193195
// Updated to v1.8.1.102
194196
// or (on same version):
195197
// Already at v1.8.1.102
196-
var regexResult = Regex.Match(cliResult.StandardOutput, @"((?>version )(?'version'\d+\.\d+\.\d+))");
198+
var regexResult = Regex.Match(cliResult.StandardOutput, @"((?>v)(?'version'\d+\.\d+\.\d+\.\d+))");
197199

198200
if (regexResult.Success)
199201
{
200-
logger.LogMessage($"nanoCLR instance updated to v{regexResult.Groups["version"].Value}",
201-
Settings.LoggingLevel.Verbose);
202+
logger.LogMessage(
203+
$"nanoCLR instance updated to v{regexResult.Groups["version"].Value}",
204+
Settings.LoggingLevel.Verbose);
202205
}
203206
else
204207
{
205-
logger.LogPanicMessage($"*** Failed to update nanoCLR instance. {cliResult.StandardOutput}.");
208+
logger.LogPanicMessage($"*** Failed to update nanoCLR instance ***");
206209
}
207210
}
208211
else
209212
{
210213
logger.LogMessage(
211214
$"Failed to update nanoCLR instance. Exit code {cliResult.ExitCode}.",
212-
Settings.LoggingLevel.Detailed);
215+
Settings.LoggingLevel.Detailed);
213216
}
214217
}
215218
}
216219
internal class NuGetPackage
217220
{
218221
public string[] Versions { get; set; }
219222
}
220-
221223
}
222224
}

0 commit comments

Comments
 (0)