-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
C3 2.5.0
Bug
If an invalid type is provided to the C3 as a cli argument C3 threats it as if nothing/undefined was passed saying that a type needs to be specified.
I think this is a bug and that C3 should say that the type is invalid instead of acting as if none was provided
Feature Request
As a user I don't really get any information about what types are allowed, if I run C3 with --help, the type indicated there is simply string which is not much help:

Note that if I run C3 interactively I get a human-readable representation of the type chosen, so not even there I ever get the actual type I can provide to C3.
For example if I create a hello world worker I get "Hello World" Worker as the type which gives me almost zero indication that the type to pass in this case is hello-world:

Note: above we do get a Copying files from "hello-world" template, but that's accidental more then anything, does not clearly inform that the type is hello-world and is not applicable for example for the webFramework type which doesn't rely on templates
Basically I think that the only way to know what types are allowed is to read the C3 source code, and I think C3 should provide list of the available types so that users can know what's available.
It could be done:
- as part of the bug fix: if the user provides an invalid
typeC3 says that it is invalid and provides a list of the valid ones - in the help message: instead of
[string]we provide the list of availabletypes (this feels to me like the proper solution) - in the C3 docs: we add a section regarding the cli arguments and there add the list of available types, and maybe the help message we refer users to the C3 docs for more information (not a clean solution in my opinion but I figured I could mention it)
