Skip to content

Exception in help command #147

@dtv42

Description

@dtv42

When using a command loop calling help with an unknown command results in an System.NullReferenceException in Future.cs

Object reference not set to an instance of an object.
at NClap.Metadata.CommandGroup`1.get_Selection()

The minimal Program to show this behaviour is:

var loop = new Loop(typeof(CommandType));
loop.Execute();

public partial class Program
{
enum CommandType
{
[HelpCommand]
Help,

    [Command(typeof(ExitCommand))]
    Exit
}

}

Typing 'help exit' works as expected, typing 'help xxx' crashes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions