From f15831aa0ac83156d218af5364e35d04843e0ac3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Amado?= Date: Sun, 25 Sep 2022 11:13:56 -0500 Subject: [PATCH] feat(init): Add option to execute terraform init with -no-color --- modules/terraform/init.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/terraform/init.go b/modules/terraform/init.go index e1cb17730..aa2c4c018 100644 --- a/modules/terraform/init.go +++ b/modules/terraform/init.go @@ -27,6 +27,10 @@ func InitE(t testing.TestingT, options *Options) (string, error) { if options.MigrateState { args = append(args, "-migrate-state", "-force-copy") } + // Append no-color option if specified + if options.NoColor { + args = append(args, "-no-color") + } args = append(args, FormatTerraformBackendConfigAsArgs(options.BackendConfig)...) args = append(args, FormatTerraformPluginDirAsArgs(options.PluginDir)...)