We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'm using the FCLP to get clientid and secret from the command line parameters
It worked fine however I've got secret value generated starting with dash, like -.q=blablablaG0
-.q=blablablaG0
The problem is that it is not recognised by the FCLP as a parameter value:
public class Config { public string Param { get; set; } } [TestFixture] public class when_parameter_value_start_with_dash { [Test] public void parser() { var args = new[] { "-p", "-.q=blablablaG0" }; var sut = new Fclp.FluentCommandLineParser<Config>(); sut.Setup(_ => _.Param).As('p', "param"); var res = sut.Parse(args); Assert.AreEqual("-.q=blablablaG0", sut.Object.Param); } }
the test fails with
Message: Expected: "-.q=blablablaG0" But was: null
How can I pass parameter value starting with dash ?
I've tried to pass parameter value quoted with double quotes as var args = new[] { "--param", "\"-.q=blablablaG0\"" };
var args = new[] { "--param", "\"-.q=blablablaG0\"" };
It worked but the parsed value was quoted too:
Expected: "-.q=blablablaG0" But was: ""-.q=blablablaG0""
Should I remove quotes from the Param value manually? Is there any workaround besides this ?
Param
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I'm using the FCLP to get clientid and secret from the command line parameters
It worked fine however I've got secret value generated starting with dash, like
-.q=blablablaG0
The problem is that it is not recognised by the FCLP as a parameter value:
the test fails with
How can I pass parameter value starting with dash ?
I've tried to pass parameter value quoted with double quotes as
var args = new[] { "--param", "\"-.q=blablablaG0\"" };
It worked but the parsed value was quoted too:
Should I remove quotes from the
Param
value manually? Is there any workaround besides this ?The text was updated successfully, but these errors were encountered: