File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
src/Cli/dotnet/Commands/Tool/Run Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ internal static class ToolRunCommandParser
33
33
Description = CliCommandStrings . ToolRunFromSourceOptionDescription ,
34
34
Arity = ArgumentArity . Zero
35
35
} ;
36
-
36
+
37
37
public static readonly Option < string > FromSourceConfigFile = ToolInstallCommandParser . ConfigOption ;
38
38
39
39
public static readonly Option < string [ ] > FromSourceSourceOption = ToolInstallCommandParser . SourceOption ;
Original file line number Diff line number Diff line change 9
9
using Microsoft . DotNet . Cli . ToolPackage ;
10
10
using Microsoft . DotNet . Cli . Utils ;
11
11
using Microsoft . Extensions . EnvironmentAbstractions ;
12
+ using NuGet . Frameworks ;
13
+ using NuGet . Packaging ;
12
14
using NuGet . Versioning ;
13
15
14
16
namespace Microsoft . DotNet . Cli . Commands . Tool . Run
@@ -48,7 +50,7 @@ public override int Execute()
48
50
IToolPackage toolPackage = toolPackageDownloader . InstallPackage (
49
51
new PackageLocation (
50
52
nugetConfig : _configFile != null ? new FilePath ( _configFile ) : null ,
51
- rootConfigDirectory : null ,
53
+ rootConfigDirectory : toolManifestPath . GetDirectoryPath ( ) . GetParentPath ( ) ,
52
54
sourceFeedOverrides : _sources ,
53
55
additionalFeeds : _addSource ) ,
54
56
packageId : packageId ,
@@ -58,6 +60,9 @@ public override int Execute()
58
60
IgnoreFailedSources : _ignoreFailedSources ,
59
61
Interactive : _interactive ) ) ;
60
62
63
+ LocalToolsResolverCache localToolsResolverCache = new ( ) ;
64
+ localToolsResolverCache . SaveToolPackage ( toolPackage , BundledTargetFramework . GetTargetFrameworkMoniker ( ) ) ;
65
+
61
66
toolManifestEditor . Add (
62
67
toolManifestPath ,
63
68
packageId ,
You can’t perform that action at this time.
0 commit comments