oakton
oakton copied to clipboard
Wrong help generated for dictionaries
Generated help for dictionaries is wrong, as it includes 4 dashes (----
) instead of 2
public class RunInput {
[Description("The connection string", Name = "connection-string")]
public string ConnectionString { get; set; }
[Description("Check scripts to be applied, but do not run them")]
[FlagAlias("dry-run")]
public bool DryRunFlag { get; set; }
[Description("An optional list of variables to be used in scripts")]
public Dictionary<string, string> VarFlag { get; set; } = new Dictionary<string, string>();
}
run - Create or update a database
└── Create or update a database
└── dotnet run -- run <connectionstring>
├── [-d, --dry-run]
└── [----var:<prop> <value>]
I guess this happens as a result of
https://github.com/JasperFx/oakton/blob/cf9e006686a69cf9e77785deefb5a2a21d5b911a/src/Oakton/Parsing/InputParser.cs#L14
https://github.com/JasperFx/oakton/blob/cf9e006686a69cf9e77785deefb5a2a21d5b911a/src/Oakton/Parsing/InputParser.cs#L111-L116
https://github.com/JasperFx/oakton/blob/cf9e006686a69cf9e77785deefb5a2a21d5b911a/src/Oakton/Parsing/DictionaryFlag.cs#L20-L22
and finally
https://github.com/JasperFx/oakton/blob/cf9e006686a69cf9e77785deefb5a2a21d5b911a/src/Oakton/Parsing/DictionaryFlag.cs#L61