-
Notifications
You must be signed in to change notification settings - Fork 35
Closed
Description
Create template.toml as below, it will pass validation:
name = "Test template"
description = "A description"
kickstart_version = 1
[[variables]]
name = "create_demo_data"
default = true
prompt = "Create demo data?"
choices = [true, false]or
name = "Test template"
description = "A description"
kickstart_version = 1
[[variables]]
name = "demo_record_count"
default = 100
prompt = "How many demo data to be created?"
choices = [100, 150, 200]But when try generate code with such template, it will fail with error:
Create demo data?:
thread 'main' panicked at src\cli\prompt.rs:88:74:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
How many demo data to be created?:
thread 'main' panicked at src\cli\prompt.rs:88:74:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Expected:
- Should fail validation for such variable definition.
- Since
kickstartdo not validate template before apply it, it's better to prompt choices for string variable only.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels