HCL2 inspect remove debug values

This commit is contained in:
Adrien Delorme 2020-08-26 15:21:32 +02:00
parent 9eaa2e17f7
commit 91c5a4613c
2 changed files with 4 additions and 4 deletions

View File

@ -19,7 +19,7 @@ func Test_commands(t *testing.T) {
> input-variables: > input-variables:
var.fruit: "banana" [debug: {Type:cty.String,CmdValue:banana,VarfileValue:null,EnvValue:null,DefaultValue:null}] var.fruit: "banana"
> local-variables: > local-variables:
@ -46,7 +46,7 @@ local.fruit: "banana"
> input-variables: > input-variables:
var.fruit: "peach" [debug: {Type:cty.String,CmdValue:peach,VarfileValue:null,EnvValue:null,DefaultValue:banana}] var.fruit: "peach"
> local-variables: > local-variables:
@ -58,7 +58,7 @@ var.fruit: "peach" [debug: {Type:cty.String,CmdValue:peach,VarfileValue:null,Env
> input-variables: > input-variables:
var.fruit: "peach" [debug: {Type:cty.String,CmdValue:peach,VarfileValue:null,EnvValue:null,DefaultValue:banana}] var.fruit: "peach"
> local-variables: > local-variables:

View File

@ -462,7 +462,7 @@ func (p *PackerConfig) printVariables() string {
out.WriteString("> input-variables:\n\n") out.WriteString("> input-variables:\n\n")
for _, v := range p.InputVariables { for _, v := range p.InputVariables {
val, _ := v.Value() val, _ := v.Value()
fmt.Fprintf(out, "var.%s: %q [debug: %#v]\n", v.Name, PrintableCtyValue(val), v) fmt.Fprintf(out, "var.%s: %q\n", v.Name, PrintableCtyValue(val))
} }
out.WriteString("\n> local-variables:\n\n") out.WriteString("\n> local-variables:\n\n")
for _, v := range p.LocalVariables { for _, v := range p.LocalVariables {