-
-
Notifications
You must be signed in to change notification settings - Fork 666
Description
✅ tuist init
✅ tuist init --template default
✅ tuist init -t default
❌ tuist init --template swiftui (Error: Missing expected argument '--name <name>')
✅ tuist init -t swiftui
Both the default and swiftui templates define the attribute the same way:
let nameAttribute: Template.Attribute = .required("name")
Since the attribute is defined as required, all 5 above cases should fail with the "missing expected argument" error. However, there is special logic excluding the default template from the validation check. There is also special logic which properly sets name when it is unspecified. Additionally, there is a bug which skips the check when using the -t form of the argument.
It makes sense to allow custom templates to use the automatic name just like the default template can. However, it seems strange to use the .required syntax for an attribute which is not actually required.