Skip to content

Trying to add new feature - System.CommandLine is confuzzeling me #238

Answered by RachelAmbler
RachelAmbler asked this question in Q&A
Discussion options

You must be logged in to vote

Sussed it:

//DEPENDENCY OPTIONS
private static Option<bool> AnalyzeScriptsForDependencies() =>
    new(
        new[] { "--AnalyzeScriptsForDependencies", "--dependencies", "--de" },
        description:"AnalyzeScriptsForDependencies - This instructs grate that each script may contain dependency specifications."
    );

The first argument (or one of the arguments at least) apparently has to match the option name.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@erikbra
Comment options

@RachelAmbler
Comment options

@erikbra
Comment options

Answer selected by RachelAmbler
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants