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

String Paramter in the Format "$(MESSAGE)" results in empty String #94

Closed Swarley97 closed 1 year ago

Swarley97 commented 1 year ago

I have the following app:

ConsoleApp app = ConsoleApp.Create(args);
app.AddCommands<TestCommand>();
app.Run();

public class TestCommand : ConsoleAppBase
{
    public int Execute(string message)
    {
        Console.WriteLine(message);
        return 0;
    }
}

If I execute this application with the following parameter ' execute --message "$(Message)" ', the parameter 'message' is an empty string. It seems passing a argument in the format "$(Something)" will handled in a special way, but I want just the raw string, so in my testcase "$(Parameter)". Is that possible?