mirror of
https://github.com/opentofu/opentofu.git
synced 2024-12-25 08:21:07 -06:00
Added Quiet value (#32116)
* Added Quiet value * Added Quiet value * Added Quiet value * Removed comments on 170 171 173 Co-authored-by: itspooya <fallenangel201190@gmail.com>
This commit is contained in:
parent
29b8a07105
commit
6bbb76eca3
@ -57,6 +57,10 @@ func (p *provisioner) GetSchema() (resp provisioners.GetSchemaResponse) {
|
||||
Type: cty.Map(cty.String),
|
||||
Optional: true,
|
||||
},
|
||||
"quiet": {
|
||||
Type: cty.Bool,
|
||||
Optional: true,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@ -163,7 +167,11 @@ func (p *provisioner) ProvisionResource(req provisioners.ProvisionResourceReques
|
||||
go copyUIOutput(req.UIOutput, tee, copyDoneCh)
|
||||
|
||||
// Output what we're about to run
|
||||
req.UIOutput.Output(fmt.Sprintf("Executing: %q", cmdargs))
|
||||
if quietVal := req.Config.GetAttr("quiet"); !quietVal.IsNull() && quietVal.True() {
|
||||
req.UIOutput.Output("local-exec: Executing: Suppressed by quiet=true")
|
||||
} else {
|
||||
req.UIOutput.Output(fmt.Sprintf("Executing: %q", cmdargs))
|
||||
}
|
||||
|
||||
// Start the command
|
||||
err = cmd.Start()
|
||||
|
Loading…
Reference in New Issue
Block a user