imperative
imperative copied to clipboard
[single-profile] Including empty value in base profile template causes misleading error message
If base profile contains an option with defaultValue
undefined and includeInTemplate=true
, it will appear in the config template as an empty value. For example:
"my_base": {
"type": "base",
"properties": {
"host": "",
"port": 443
}
}
When zowe auth login
is run, a misleading error message is returned:
Syntax Error:
No value specified for option:
--host
This option requires a value of type:
string
Option Description:
Host name of service on the mainframe.
Current Behavior
In the error message, it sounds like the user did something wrong by omitting an option with required=true
, because of the wording "no value specified" and "this option requires a value".
Expected Behavior The error message should clearly explain that a value was provided, but empty values are not allowed for this option. Ideally it could also show the user where the empty value originated from.