Cysharp / ConsoleAppFramework

Zero Dependency, Zero Overhead, Zero Reflection, Zero Allocation, AOT Safe CLI Framework powered by C# Source Generator.
MIT License
1.54k stars 88 forks source link

"Index was outside the bounds of the array" when no value is provided #109

Closed xPaw closed 1 month ago

xPaw commented 1 month ago
ConsoleApp.Run(args, (int foo) => Console.WriteLine($"Foo: {foo}"));

Command: ./cmd --foo

This also makes me think the unchecked args[++i] would eat next argument.

For parameters that require a value, it should say so.

neuecc commented 1 month ago

thanks! I've fixed in v5.0.1!