go-commons icon indicating copy to clipboard operation
go-commons copied to clipboard

Move "GetPathRelativeTo" from terragrunt and patcher here as a utility function

Open ina-stoyanova opened this issue 3 years ago • 3 comments
trafficstars

So far, we have had to copy and paste the GetPathRelativeTo function from terragrunt repo to the patcher/util repo package. We should instead have this command available here so we avoid duplication.

ina-stoyanova avatar Oct 13 '22 08:10 ina-stoyanova

This function already exists in go-commons: https://github.com/gruntwork-io/go-commons/blob/master/files/paths.go#L70.

However, it seems that a bug fix has been implemented in the function in Terragrunt, and hasn't been ported here.

Therefore the right course of action is:

  • [x] Port the above bug fix from Terragrunt to go-commons
  • [ ] Remove the definition of GetPathRelativeTo from Terragrunt (and any other repos that currently define their own versions of it) and use the function from go-commons instead

infraredgirl avatar Oct 19 '22 17:10 infraredgirl

Another bug in GetPathRelativeTo() was discovered and I just posted a fix in #78. After this is merged, I'll release another version of go-commons and ensure that all the repos that start to make use of GetPathRelativeTo() use this latest version.

infraredgirl avatar Oct 25 '22 10:10 infraredgirl

Another bug in GetPathRelativeTo() was discovered and I just posted a fix in #78. After this is merged, I'll release another version of go-commons and ensure that all the repos that start to make use of GetPathRelativeTo() use this latest version.

This has been done.

infraredgirl avatar Oct 25 '22 17:10 infraredgirl