Throw Command Unknown for dependency tools in libraries. (#2933)
* Throw Command Unknown for dependency tools in libraries. * Add testProjects to test tools command for libraries. * update failing tests * Add tests verifying that dependency tools are not available in libraries
This commit is contained in:
parent
e53acd9bba
commit
0336f6bb34
9 changed files with 141 additions and 26 deletions
|
@ -9,7 +9,7 @@ namespace Microsoft.DotNet.Tools.DependencyInvoker
|
|||
{
|
||||
public class Program
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
public static int Main(string[] args)
|
||||
{
|
||||
DebugHelper.HandleDebugSwitch(ref args);
|
||||
|
||||
|
@ -21,7 +21,7 @@ namespace Microsoft.DotNet.Tools.DependencyInvoker
|
|||
{
|
||||
Console.WriteLine("A command name must be provided");
|
||||
|
||||
return;
|
||||
return 1;
|
||||
}
|
||||
|
||||
var projectContexts =
|
||||
|
@ -59,8 +59,10 @@ namespace Microsoft.DotNet.Tools.DependencyInvoker
|
|||
catch (CommandUnknownException)
|
||||
{
|
||||
Console.WriteLine($"Command not found");
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
private static IEnumerable<ProjectContext> CreateProjectContexts(string projectPath = null)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue