зеркало из https://github.com/microsoft/BuildXL.git
Merged PR 754001: Remove extractor failure if file does not exist to set permission bit
- This code makes it impossible to update the Linux nodejs packages
This commit is contained in:
Родитель
84a8ae1dea
Коммит
3bbba3fd84
|
@ -22,7 +22,7 @@ namespace Tool.Download
|
|||
/// </summary>
|
||||
internal sealed class Extractor : ToolProgram<ExtractorArgs>
|
||||
{
|
||||
private static readonly Dictionary<string, string> packagesToBeChecked = new Dictionary<string, string>
|
||||
private static readonly Dictionary<string, string> s_packagesToBeChecked = new Dictionary<string, string>
|
||||
{
|
||||
{"NodeJs.linux-x64", "node-v18.6.0-linux-x64/bin/node"},
|
||||
{"DotNet-Runtime.linux", "dotnet"}
|
||||
|
@ -137,11 +137,11 @@ namespace Tool.Download
|
|||
tar.ExtractContents(target);
|
||||
if (OperatingSystemHelper.IsLinuxOS)
|
||||
{
|
||||
foreach (var packageName in packagesToBeChecked.Keys)
|
||||
foreach (var packageName in s_packagesToBeChecked.Keys)
|
||||
{
|
||||
if (target.Contains(packageName))
|
||||
{
|
||||
if (!SetExecutePermissionsForExtractedFiles(target, packagesToBeChecked[packageName]))
|
||||
if (!SetExecutePermissionsForExtractedFiles(target, s_packagesToBeChecked[packageName]))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -213,11 +213,6 @@ namespace Tool.Download
|
|||
{
|
||||
_ = FileUtilities.TrySetExecutePermissionIfNeeded(fullPathForExecutableFile);
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.Error.WriteLine($"Failed to find the file - {relativePath} at the expected location: {fullPathForExecutableFile}");
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче