We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ex: consider a command that takes integer as keyword value cli> set value
cli>set value "" <------------Exists CLI shell
Below diff solves the problem
supervisor@deeksha_march9_spine>srv2:~/development/cligen $ git diff diff --git a/cligen_match.c b/cligen_match.c index 2318610..6cc4af7 100644 --- a/cligen_match.c +++ b/cligen_match.c @@ -155,6 +155,9 @@ match_object(cligen_handle h, { int match = 0; size_t len = 0; + enum cv_type t; + + t = co->co_vtype; if (str) len = strlen(str); @@ -190,8 +193,13 @@ match_object(cligen_handle h, } break; case CO_VARIABLE: - if (str == NULL || len==0) - match++; + if (str == NULL || len==0) { + if ((t>= CGV_INT8) && (t<=CGV_DEC64)) { + *reason = cligen_reason("'%s' is not a number", str); + } else { + match++; + } + } else if ((match = match_variable(h, co, str, reason)) < 0) return -1; supervisor@deeksha_march9_spine>srv2:~/development/cligen $
The text was updated successfully, but these errors were encountered:
Fixed: [Giving empty string as value for integer variable exists the …
f382a6e
…CLI shell](#85)
No branches or pull requests
Ex: consider a command that takes integer as keyword value
cli> set value
Below diff solves the problem
The text was updated successfully, but these errors were encountered: