Skip to content

Commit bcbd802

Browse files
committed
re-add error when installing a RID-specific package but no matching RID is found
1 parent 3dcd541 commit bcbd802

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Cli/dotnet/ToolPackage/ToolPackageDownloaderBase.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -333,8 +333,8 @@ public bool TryGetDownloadedTool(
333333
var bestRuntimeIdentifier = Microsoft.NET.Build.Tasks.NuGetUtils.GetBestMatchingRid(runtimeGraph, RuntimeInformation.RuntimeIdentifier, toolConfiguration.RidSpecificPackages.Keys, out bool wasInGraph);
334334
if (bestRuntimeIdentifier == null)
335335
{
336-
// no need to throw here - as long as we're packaging the main RID-agnostic package we can still work cross-platform.
337-
return;
336+
throw new ToolPackageException(string.Format(CliStrings.ToolUnsupportedRuntimeIdentifier, RuntimeInformation.RuntimeIdentifier,
337+
string.Join(" ", toolConfiguration.RidSpecificPackages.Keys)));
338338
}
339339

340340
var resolvedPackage = toolConfiguration.RidSpecificPackages[bestRuntimeIdentifier];

0 commit comments

Comments
 (0)