@@ -19,6 +19,12 @@ internal class ToolRunFromSourceCommand(
19
19
private readonly string ? _toolCommandName = result . GetValue ( ToolRunCommandParser . CommandNameArgument ) ;
20
20
private readonly IEnumerable < string > ? _forwardArguments = result . GetValue ( ToolRunCommandParser . CommandArgument ) ;
21
21
private readonly bool _allowRollForward = result . GetValue ( ToolRunCommandParser . RollForwardOption ) ;
22
+ private readonly string ? _configFile = result . GetValue ( ToolRunCommandParser . FromSourceConfigFile ) ;
23
+ private readonly string [ ] _sources = result . GetValue ( ToolRunCommandParser . FromSourceSourceOption ) ?? [ ] ;
24
+ private readonly string [ ] _addSource = result . GetValue ( ToolRunCommandParser . FromSourceAddSourceOption ) ?? [ ] ;
25
+ private readonly bool _ignoreFailedSources = result . GetValue ( ToolCommandRestorePassThroughOptions . IgnoreFailedSourcesOption ) ;
26
+ private readonly bool _interactive = result . GetValue ( ToolCommandRestorePassThroughOptions . InteractiveRestoreOption ) ;
27
+ private readonly VerbosityOptions _verbosity = result . GetValue ( ToolRunCommandParser . VerbosityOption ) ;
22
28
23
29
public override int Execute ( )
24
30
{
@@ -40,10 +46,17 @@ public override int Execute()
40
46
ToolPackageDownloader toolPackageDownloader = new ( toolPackageStoreAndQuery ) ;
41
47
42
48
IToolPackage toolPackage = toolPackageDownloader . InstallPackage (
43
- new PackageLocation ( ) ,
49
+ new PackageLocation (
50
+ nugetConfig : _configFile != null ? new FilePath ( _configFile ) : null ,
51
+ rootConfigDirectory : null ,
52
+ sourceFeedOverrides : _sources ,
53
+ additionalFeeds : _addSource ) ,
44
54
packageId : packageId ,
45
- verbosity : VerbosityOptions . d ,
46
- versionRange : versionRange ) ;
55
+ verbosity : _verbosity ,
56
+ versionRange : versionRange ,
57
+ restoreActionConfig : new (
58
+ IgnoreFailedSources : _ignoreFailedSources ,
59
+ Interactive : _interactive ) ) ;
47
60
48
61
toolManifestEditor . Add (
49
62
toolManifestPath ,
0 commit comments