Skip to content

The CLI help shows string array arguments as optional

Check, for instance, what happens to the <Package names> argument:

$ tap package test -h
Usage: test [-h] [-v] [-c] [-q] [-i] [<Package names>]
   -h, --help             Write help information.
   -v, --verbose          Show verbose/debug level log messages.
   -c, --color            Color messages according to their level.
   -q, --quiet            Quiets console logging.
   -i, --ignore-missing   Ignore names of packages that could not be found.

which is defined as an array of strings in Test.cs:

        [UnnamedCommandLineArgument("Package names", Required = true)]
        public string[] Packages { get; set; }
Edited by Giulio Galante