MacOs HighSierra Fallback (#8437)

walk around for https://github.com/dotnet/corefx/issues/26488
This commit is contained in:
William Lee 2018-01-22 10:45:35 -08:00 committed by GitHub
parent 4dc001ca47
commit 839eccbcaf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -38,7 +38,7 @@ namespace Microsoft.DotNet.Tools.Install.Tool
argsToPassToRestore.AddRange(new List<string> argsToPassToRestore.AddRange(new List<string>
{ {
"--runtime", "--runtime",
RuntimeEnvironment.GetRuntimeIdentifier(), GetRuntimeIdentifierWithMacOsHighSierraFallback(),
$"/p:BaseIntermediateOutputPath={assetJsonOutput.ToQuotedString()}" $"/p:BaseIntermediateOutputPath={assetJsonOutput.ToQuotedString()}"
}); });
@ -56,5 +56,17 @@ namespace Microsoft.DotNet.Tools.Install.Tool
result.StartInfo.WorkingDirectory, result.StartInfo.Arguments, result.StdErr, result.StdOut)); result.StartInfo.WorkingDirectory, result.StartInfo.Arguments, result.StdErr, result.StdOut));
} }
} }
// walk around for https://github.com/dotnet/corefx/issues/26488
// fallback osx.10.13 to osx
private static string GetRuntimeIdentifierWithMacOsHighSierraFallback()
{
if (RuntimeEnvironment.GetRuntimeIdentifier() == "osx.10.13-x64")
{
return "osx-x64";
}
return RuntimeEnvironment.GetRuntimeIdentifier();
}
} }
} }