Fix install and update of nanoclr (#220)

***NO_CI***
This commit is contained in:
José Simões 2023-05-12 17:29:42 +01:00 коммит произвёл GitHub
Родитель e6201c4015
Коммит 5963e0d582
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 9 добавлений и 7 удалений

Просмотреть файл

@ -93,6 +93,8 @@ namespace nanoFramework.TestAdapter
{
logger.LogMessage($"No need to update. Running v{latestPackageVersion}",
Settings.LoggingLevel.Verbose);
performInstallUpdate = false;
}
}
else
@ -137,7 +139,7 @@ namespace nanoFramework.TestAdapter
}
else
{
logger.LogPanicMessage($"*** Failed to install/update nanoclr. {cliResult.StandardOutput}.");
logger.LogPanicMessage($"*** Failed to install/update nanoclr *** {Environment.NewLine} {cliResult.StandardOutput}");
NanoClrIsInstalled = false;
}
@ -193,16 +195,17 @@ namespace nanoFramework.TestAdapter
// Updated to v1.8.1.102
// or (on same version):
// Already at v1.8.1.102
var regexResult = Regex.Match(cliResult.StandardOutput, @"((?>version )(?'version'\d+\.\d+\.\d+))");
var regexResult = Regex.Match(cliResult.StandardOutput, @"((?>v)(?'version'\d+\.\d+\.\d+\.\d+))");
if (regexResult.Success)
{
logger.LogMessage($"nanoCLR instance updated to v{regexResult.Groups["version"].Value}",
logger.LogMessage(
$"nanoCLR instance updated to v{regexResult.Groups["version"].Value}",
Settings.LoggingLevel.Verbose);
}
else
{
logger.LogPanicMessage($"*** Failed to update nanoCLR instance. {cliResult.StandardOutput}.");
logger.LogPanicMessage($"*** Failed to update nanoCLR instance ***");
}
}
else
@ -217,6 +220,5 @@ namespace nanoFramework.TestAdapter
{
public string[] Versions { get; set; }
}
}
}