File tree 1 file changed +6
-4
lines changed
src/Cli/dotnet/commands/dotnet-tool/update
1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 8
8
using Microsoft . DotNet . ToolManifest ;
9
9
using Microsoft . DotNet . ToolPackage ;
10
10
using Microsoft . DotNet . Tools . Tool . Common ;
11
+ using Microsoft . Extensions . EnvironmentAbstractions ;
11
12
using CreateShellShimRepository = Microsoft . DotNet . Tools . Tool . Install . CreateShellShimRepository ;
12
13
13
14
namespace Microsoft . DotNet . Tools . Tool . Update
@@ -43,16 +44,17 @@ public ToolUpdateCommand(
43
44
localToolsResolverCache ,
44
45
reporter ) ;
45
46
47
+ _global = result . GetValue ( ToolInstallCommandParser . GlobalOption ) ;
48
+ _toolPath = result . GetValue ( ToolInstallCommandParser . ToolPathOption ) ;
49
+ DirectoryPath ? location = string . IsNullOrWhiteSpace ( _toolPath ) ? null : new DirectoryPath ( _toolPath ) ;
46
50
_toolUpdateGlobalOrToolPathCommand =
47
51
toolUpdateGlobalOrToolPathCommand
48
52
?? new ToolUpdateGlobalOrToolPathCommand (
49
53
result ,
50
54
createToolPackageStoreDownloaderUninstaller ,
51
55
createShellShimRepository ,
52
- reporter ) ;
53
-
54
- _global = result . GetValue ( ToolInstallCommandParser . GlobalOption ) ;
55
- _toolPath = result . GetValue ( ToolInstallCommandParser . ToolPathOption ) ;
56
+ reporter ,
57
+ ToolPackageFactory . CreateToolPackageStoreQuery ( location ) ) ;
56
58
}
57
59
58
60
You can’t perform that action at this time.
0 commit comments