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:
Bryan Thornbury 2016-05-08 14:20:34 -07:00 committed by Piotr Puszkiewicz
parent e53acd9bba
commit 0336f6bb34
9 changed files with 141 additions and 26 deletions

View file

@ -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)