forward param for dotnet tool udpate (#9969)

This commit is contained in:
William Li 2018-09-24 09:23:59 -07:00 committed by GitHub
parent 23612babd8
commit 824a014203
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -37,6 +37,7 @@ namespace Microsoft.DotNet.Tools.Tool.Update
private readonly bool _global;
private readonly string _verbosity;
private readonly string _toolPath;
private readonly IEnumerable<string> _forwardRestoreArguments;
public ToolUpdateCommand(AppliedOption appliedCommand,
ParseResult parseResult,
@ -57,6 +58,7 @@ namespace Microsoft.DotNet.Tools.Tool.Update
_global = appliedCommand.ValueOrDefault<bool>("global");
_verbosity = appliedCommand.SingleArgumentOrDefault("verbosity");
_toolPath = appliedCommand.SingleArgumentOrDefault("tool-path");
_forwardRestoreArguments = appliedCommand.OptionValuesToBeForwarded();
_createToolPackageStoreAndInstaller = createToolPackageStoreAndInstaller ??
ToolPackageFactory.CreateToolPackageStoreAndInstaller;
@ -79,7 +81,7 @@ namespace Microsoft.DotNet.Tools.Tool.Update
}
(IToolPackageStore toolPackageStore, IToolPackageInstaller toolPackageInstaller) =
_createToolPackageStoreAndInstaller(toolPath);
_createToolPackageStoreAndInstaller(toolPath, _forwardRestoreArguments);
IShellShimRepository shellShimRepository = _createShellShimRepository(toolPath);