|
resolvedArgs[i] = t.ResolvePath(arg) |
When used from Task, this code is producing absolute paths (i.e. filepath.Join(b.WorkingDir, path)), however the expectation is that these paths remain relative, otherwise the tar command fails. It seems like b.WorkingDir is set and that results in a relative path becoming an absolute path, which tar rejects.
The exact resolution is unclear, but perhaps calling ResolvePath() is wrong, and instead a check should ensure that path is relative to b.WorkingDir - I think that is the original intention, however ResolvePath() is used in different ways in the code which suggests that the comment and code are not matching (any more).
Related go-task/task#2567
u-root/pkg/core/tar/tar.go
Line 134 in 58ed27c
When used from Task, this code is producing absolute paths (i.e.
filepath.Join(b.WorkingDir, path)), however the expectation is that these paths remain relative, otherwise the tar command fails. It seems like b.WorkingDir is set and that results in a relative path becoming an absolute path, which tar rejects.The exact resolution is unclear, but perhaps calling ResolvePath() is wrong, and instead a check should ensure that
pathis relative tob.WorkingDir- I think that is the original intention, however ResolvePath() is used in different ways in the code which suggests that the comment and code are not matching (any more).Related go-task/task#2567