From 708260eedd2fbd93578b9a81872e0fcd647d637c Mon Sep 17 00:00:00 2001 From: Alexander Sharov Date: Thu, 13 Jun 2024 17:42:43 +0300 Subject: [PATCH] fix: terragrunt binary name --- versionmanager/retriever/terragrunt/terragruntretriever.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/versionmanager/retriever/terragrunt/terragruntretriever.go b/versionmanager/retriever/terragrunt/terragruntretriever.go index e81109bf..0b830d35 100644 --- a/versionmanager/retriever/terragrunt/terragruntretriever.go +++ b/versionmanager/retriever/terragrunt/terragruntretriever.go @@ -107,7 +107,12 @@ func (r TerragruntRetriever) InstallRelease(versionStr string, targetPath string return err } - return os.WriteFile(filepath.Join(targetPath, fileName), data, 0755) + terragruntBinaryName := config.TerragruntName + if runtime.GOOS == "windows" { + terragruntBinaryName = terragruntBinaryName + ".exe" + } + + return os.WriteFile(filepath.Join(targetPath, terragruntBinaryName), data, 0755) } func (r TerragruntRetriever) ListReleases() ([]string, error) {