From 46ff660271cab3f5a002ec9b2751d30bbbf43eef Mon Sep 17 00:00:00 2001 From: Sergei Vorobev Date: Wed, 2 Nov 2016 14:25:46 -0700 Subject: [PATCH] Fix crypto libs patching logic to accomodate multiply files (#2541) Native library also changed from System.Security.Cryptography.Native.dylib to System.Security.Cryptography.Native.OpenSsl.dylib See discussion in #2510 --- build.psm1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build.psm1 b/build.psm1 index 0c8838b00f..04fd38c815 100644 --- a/build.psm1 +++ b/build.psm1 @@ -242,8 +242,8 @@ function Start-PSBuild { # This is the restored library used to build # This is allowed to fail since the user may have already restored Write-Warning ".NET Core links the incorrect OpenSSL, correcting NuGet package libraries..." - find $env:HOME/.nuget -name System.Security.Cryptography.Native.dylib | xargs sudo install_name_tool -add_rpath /usr/local/opt/openssl/lib - find $env:HOME/.nuget -name System.Net.Http.Native.dylib | xargs sudo install_name_tool -change /usr/lib/libcurl.4.dylib /usr/local/opt/curl/lib/libcurl.4.dylib + find $env:HOME/.nuget -name System.Security.Cryptography.Native.OpenSsl.dylib | % { sudo install_name_tool -add_rpath /usr/local/opt/openssl/lib $_ } + find $env:HOME/.nuget -name System.Net.Http.Native.dylib | % { sudo install_name_tool -change /usr/lib/libcurl.4.dylib /usr/local/opt/curl/lib/libcurl.4.dylib $_ } } } @@ -885,7 +885,7 @@ function Install-Dotnet { # This is the library shipped with .NET Core # This is allowed to fail as the user may have installed other versions of dotnet Write-Warning ".NET Core links the incorrect OpenSSL, correcting .NET CLI libraries..." - find $env:HOME/.dotnet -name System.Security.Cryptography.Native.dylib | xargs sudo install_name_tool -add_rpath /usr/local/opt/openssl/lib + find $env:HOME/.dotnet -name System.Security.Cryptography.Native.dylib | % { sudo install_name_tool -add_rpath /usr/local/opt/openssl/lib } } } elseif ($IsWindows) { Remove-Item -ErrorAction SilentlyContinue -Recurse -Force ~\AppData\Local\Microsoft\dotnet