(bug) Show YAML plan parameters without defaults as required #2095
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This fixes a minor bug in
Bolt::PAL.get_plan_info
that incorrectlybuilt the parameter hash for YAML plans, resulting in an inaccurate
usage line in
bolt plan show <plan>
output.Previously, if a YAML plan parameter did not have a default value,
the parameter hash would receive a value of
nil
for the parameter'sdefault value. When this hash is received by the outputter to display
the plan info, it would check whether the parameter had a default value
key specified to determine whether it should display the parameter as
optional or required in the usage line. Since parameters for YAML plans
would always have this key, the outputter would show all parameters as
optional. Now, the default value key is only added if there is a default
value for the parameter.
!bug
Show YAML plan parameters without default values as required
Bolt was displaying YAML plan parameters without default values as
optional in
bolt plan show
output. Now, Bolt will show a parameterwithout a default value as required.