Skip to content

Commit 69cf295

Browse files
edvilmedsplaisted
authored andcommitted
Fix typo
1 parent f689647 commit 69cf295

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/Cli/dotnet/Commands/Tool/Run/ToolRunCommandParser.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ internal static class ToolRunCommandParser
3333
Description = CliCommandStrings.ToolRunFromSourceOptionDescription,
3434
Arity = ArgumentArity.Zero
3535
};
36-
36+
3737
public static readonly Option<string> FromSourceConfigFile = ToolInstallCommandParser.ConfigOption;
3838

3939
public static readonly Option<string[]> FromSourceSourceOption = ToolInstallCommandParser.SourceOption;

src/Cli/dotnet/Commands/Tool/Run/ToolRunFromSourceCommand.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
using Microsoft.DotNet.Cli.ToolPackage;
1010
using Microsoft.DotNet.Cli.Utils;
1111
using Microsoft.Extensions.EnvironmentAbstractions;
12+
using NuGet.Frameworks;
13+
using NuGet.Packaging;
1214
using NuGet.Versioning;
1315

1416
namespace Microsoft.DotNet.Cli.Commands.Tool.Run
@@ -48,7 +50,7 @@ public override int Execute()
4850
IToolPackage toolPackage = toolPackageDownloader.InstallPackage(
4951
new PackageLocation(
5052
nugetConfig: _configFile != null ? new FilePath(_configFile) : null,
51-
rootConfigDirectory: null,
53+
rootConfigDirectory: toolManifestPath.GetDirectoryPath().GetParentPath(),
5254
sourceFeedOverrides: _sources,
5355
additionalFeeds: _addSource),
5456
packageId: packageId,
@@ -58,6 +60,9 @@ public override int Execute()
5860
IgnoreFailedSources: _ignoreFailedSources,
5961
Interactive: _interactive));
6062

63+
LocalToolsResolverCache localToolsResolverCache = new();
64+
localToolsResolverCache.SaveToolPackage(toolPackage, BundledTargetFramework.GetTargetFrameworkMoniker());
65+
6166
toolManifestEditor.Add(
6267
toolManifestPath,
6368
packageId,

0 commit comments

Comments
 (0)