From e3b3c8795be31f1a11bc2d61b35c4f5d594a3df0 Mon Sep 17 00:00:00 2001 From: Justin Hempsey Date: Wed, 21 Jun 2023 11:08:26 -0700 Subject: [PATCH] fix: debug terraform command output Correct the debug logging to output a valid terraform command that can be copied and ran --- cli/debug.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cli/debug.go b/cli/debug.go index d22bd258e..d5da290e1 100644 --- a/cli/debug.go +++ b/cli/debug.go @@ -50,10 +50,10 @@ func writeTerragruntDebugFile(terragruntOptions *options.TerragruntOptions, terr terragruntOptions.Logger.Debugf("Variables passed to terraform are located in \"%s\"", fileName) terragruntOptions.Logger.Debugf("Run this command to replicate how terraform was invoked:") terragruntOptions.Logger.Debugf( - "\tterraform %s -var-file=\"%s\" \"%s\"", + "\tterraform -chdir=\"%s\" %s -var-file=\"%s\" ", + terragruntOptions.WorkingDir, strings.Join(terragruntOptions.TerraformCliArgs, " "), fileName, - terragruntOptions.WorkingDir, ) return nil }