Skip to content

Commit

Permalink
fix: incorreft path replacement when listing repos (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
bzarboni1 committed May 27, 2024
1 parent cef3536 commit c14b799
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/pkg/functions/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,10 @@ func FindManagedRepos(ctx context.Context, reposDir string) (status.OrgSet, erro
// then it is a repository file
if strings.HasSuffix(file, "repositories/terragrunt.hcl") {

// Strip the trailing / from the reposDir
replaceDir := strings.TrimSuffix(reposDir, "/")
// Replace relative path with absolute path
file = strings.Replace(file, reposDir, absRootPath, 1)
file = strings.Replace(file, replaceDir, absRootPath, 1)

log.Printf("Working on file: %s\n", file)

Expand Down

0 comments on commit c14b799

Please sign in to comment.