File tree 1 file changed +4
-3
lines changed
src/Cli/dotnet/Commands/Add/Package
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -31,16 +31,17 @@ private static CliCommand ConstructCommand()
31
31
command . Options . Add ( PackageAddCommandParser . PrereleaseOption ) ;
32
32
command . Options . Add ( PackageCommandParser . ProjectOption ) ;
33
33
34
- command . SetAction ( ( parseResult ) => {
34
+ command . SetAction ( ( parseResult ) =>
35
+ {
35
36
// this command can be called with an argument or an option for the project path - we prefer the option.
36
37
// if the option is not present, we use the argument value instead.
37
38
if ( parseResult . HasOption ( PackageCommandParser . ProjectOption ) )
38
39
{
39
- new AddPackageReferenceCommand ( parseResult , parseResult . GetValue ( PackageCommandParser . ProjectOption ) ) . Execute ( ) ;
40
+ return new AddPackageReferenceCommand ( parseResult , parseResult . GetValue ( PackageCommandParser . ProjectOption ) ) . Execute ( ) ;
40
41
}
41
42
else
42
43
{
43
- new AddPackageReferenceCommand ( parseResult , parseResult . GetValue ( AddCommandParser . ProjectArgument ) ) . Execute ( ) ;
44
+ return new AddPackageReferenceCommand ( parseResult , parseResult . GetValue ( AddCommandParser . ProjectArgument ) ) . Execute ( ) ;
44
45
}
45
46
} ) ;
46
47
You can’t perform that action at this time.
0 commit comments