Skip to content

Commit

Permalink
feat: Upgrading go-getter to v2 in scaffold
Browse files Browse the repository at this point in the history
  • Loading branch information
yhakbar committed Oct 9, 2024
1 parent afd5d7f commit b0a7704
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
6 changes: 3 additions & 3 deletions cli/commands/scaffold/action.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"github.com/gruntwork-io/terragrunt/internal/errors"
"github.com/gruntwork-io/terragrunt/options"
"github.com/gruntwork-io/terratest/modules/files"
"github.com/hashicorp/go-getter"
"github.com/hashicorp/go-getter/v2"
)

const (
Expand Down Expand Up @@ -142,7 +142,7 @@ func Run(ctx context.Context, opts *options.TerragruntOptions, moduleURL, templa

opts.Logger.Infof("Scaffolding a new Terragrunt module %s to %s", moduleURL, opts.WorkingDir)

if err := getter.GetAny(tempDir, moduleURL); err != nil {
if _, err := getter.GetAny(ctx, tempDir, moduleURL); err != nil {
return errors.New(err)
}

Expand Down Expand Up @@ -222,7 +222,7 @@ func prepareBoilerplateFiles(ctx context.Context, opts *options.TerragruntOption
// downloading template
opts.Logger.Infof("Using template from %s", templateURL)

if err := getter.GetAny(templateDir, templateURL); err != nil {
if _, err := getter.GetAny(ctx, templateDir, templateURL); err != nil {
return "", errors.New(err)
}
}
Expand Down
1 change: 0 additions & 1 deletion cli/commands/scaffold/action_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,5 +91,4 @@ func TestDefaultTemplateVariables(t *testing.T) {
_, found := cfg.Inputs["required_var_1"]
require.True(t, found)
require.Equal(t, "git::https://github.com/gruntwork-io/terragrunt.git//test/fixtures/inputs?ref=v0.53.8", *cfg.Terraform.Source)

}

0 comments on commit b0a7704

Please sign in to comment.