aloneguid / config

⚙ Config.Net - the easiest configuration framework for .NET developers. No BS.
MIT License
656 stars 86 forks source link

Regression - Positional parameters in commandline with ':' #104

Open nkm8 opened 4 years ago

nkm8 commented 4 years ago

Re-open https://github.com/aloneguid/config/issues/43

This is currently an issue because the original fix (remove ':' as a delimiter): https://github.com/aloneguid/config/commit/475e81f7e1889cfb47d35bd75b76d18b115ed754#diff-c0a9531e46e016330ce60f8b8de66495R13

Was reverted: https://github.com/aloneguid/config/blob/master/src/Config.Net/Stores/Impl/CommandLine/CommandLineConfigStore.cs#L15

I am not sure if this was intentional or not. I can open a PR, but I am guessing that removing the ':' again isn't desired: https://github.com/aloneguid/config/commit/e14548b90468f8bc278b292f780174b7bc1cfe88

You can test this by using a positional parameter with a value like C:\temp - you will get null instead of C:\temp for .UseCommandLineArgs(new KeyValuePair<string, int>(nameof(IParameters.FolderPath), 1))

martin-braun commented 2 years ago

I agree, : is not a well thought parameter in that regards. @aloneguid, can you give some insight how one is supposed to use absolute paths on command args?