Skip to content

Commit 9cc3c78

Browse files
edvilmedsplaisted
authored andcommitted
Load package if installed
1 parent 2f27844 commit 9cc3c78

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Cli/dotnet/Commands/Tool/Runx/ToolRunxCommand.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ public override int Execute()
3030

3131
PackageLocation packageLocation = new PackageLocation(rootConfigDirectory: toolPackageStoreAndQuery.Root);
3232

33-
IToolPackage toolPackage = toolPackageDownloader.InstallPackage(packageLocation, packageId, isGlobalTool: true);
33+
IToolPackage toolPackage = toolPackageStoreAndQuery.EnumeratePackageVersions(packageId).FirstOrDefault()
34+
?? toolPackageDownloader.InstallPackage(packageLocation, packageId, isGlobalTool: true);
3435

3536
// Run package
3637

0 commit comments

Comments
 (0)