-
Notifications
You must be signed in to change notification settings - Fork 394
Open
Description
Is your feature request related to a problem? Please describe.
When defining a required symbol, if no value is provided during the call, and the symbol is followed by another symbol, the required symbol will consume the following one rather than throw an error.
Describe the solution you'd like.
If no parameter is explicitly provided for a required symbol an error shuld be thrown rather than consuming the following symbol.
Additional context
given the following template.json
"symbols": {
"foo": {
"description": "",
"type": "parameter",
"dataType": "string",
"replaces": "foo",
"isRequired": true
},
"bar": {
"description": "",
"type": "parameter",
"dataType": "string",
"replaces": "bar",
"defaultValue": "bar"
}
}
when called like so:
dotnet new new-template --foo --bar -n TestProj
the result is
Template
namespace TestNamespace;
public static class MyClass
{
public static string Foo { get; set; } = "foo";
public static string Bar { get; set; } = "bar";
}
Actual
namespace TestNamespace;
public static class MyClass
{
public static string Foo { get; set; } = "--bar";
public static string Bar { get; set; } = "bar";
}
Trokkin and ema-aka-young
Metadata
Metadata
Assignees
Labels
No labels