Skip to content
New issue

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

Entering an incorrect variable type value when prompted in terminal gives unclear error message #940

Open
cbruno10 opened this issue Oct 16, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@cbruno10
Copy link
Contributor

Describe the bug
In terminal, when being prompted to enter a variable, if I enter the wrong type, e.g., var is of type list(string), but I enter just a string, the error message says I’m missing a value rather than I entered the wrong type

cbruno@M1P awscompliance % flowpipe server
{"time":"2024-10-16T01:52:55.499126-04:00","level":"ERROR","msg":"Error loading input variables","error":"missing 1 variable value:\n\tcis_v300_2_enabled_pipelines not set\n"}

Variables defined with no value set.
var.cis_v300_2_enabled_pipelines
  List of CIS v3.0.0 section 2 pipelines to enable.

  Enter a value: test

{"time":"2024-10-16T01:52:58.418991-04:00","level":"ERROR","msg":"Error loading input variables","error":"Unknown variable: There is no variable named \"test\".\n(<value for var.cis_v300_2_enabled_pipelines>:1,1)\nNo value for required variable: The input variable \"cis_v300_2_enabled_pipelines\" is not set, and has no default value. Use a --var or --var-file command line argument to provide a value for this variable.\n(cis_v300/section_2.fp:15,41)"}
2024-10-16 01:52:58 [flowpipe] error unable to start server: Unknown variable: There is no variable named "test".
(<value for var.cis_v300_2_enabled_pipelines>:1,1)
No value for required variable: The input variable "cis_v300_2_enabled_pipelines" is not set, and has no default value. Use a --var or --var-file command line argument to provide a value for this variable.
(cis_v300/section_2.fp:15,41)

Flowpipe version (flowpipe -v)
v1.0.0-beta.202410151259

To reproduce
See above

Expected behavior
The error message should let me know I entered an incorrect type, not just that there's no value

Additional context
Add any other context about the problem here.

@cbruno10 cbruno10 added the bug Something isn't working label Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant