mirror of
https://github.com/hashicorp/packer.git
synced 2026-10-01 12:13:59 -04:00
clarify decodeVariablesSetting a little
This commit is contained in:
@@ -235,7 +235,7 @@ func (variables *Variables) decodeVariablesSetting(key string, attr *hcl.Attribu
|
||||
return diags
|
||||
}
|
||||
|
||||
value, moreDiags := attr.Expr.Value(ectx)
|
||||
defaultValue, moreDiags := attr.Expr.Value(ectx)
|
||||
diags = append(diags, moreDiags...)
|
||||
if moreDiags.HasErrors() {
|
||||
return diags
|
||||
@@ -245,10 +245,10 @@ func (variables *Variables) decodeVariablesSetting(key string, attr *hcl.Attribu
|
||||
Name: key,
|
||||
Values: []VariableAssignment{{
|
||||
From: "default",
|
||||
Value: value,
|
||||
Value: defaultValue,
|
||||
Expr: attr.Expr,
|
||||
}},
|
||||
ExpectedType: value.Type(),
|
||||
ExpectedType: defaultValue.Type(),
|
||||
Range: attr.Range,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user