hashicorp/go-slug

`Pack` fails to handle multiple levels of symlinks

Closed this issue · 2 comments

The packWalkFn assumes a symlink always points to a regular file. If we encounter a symlink which needs to be dereferenced, the target info is read via Lstat, but the archive header is always set to be a regular file and the metadata for the symlink will not match what is copied with writeBody = true (https://github.com/hashicorp/go-slug/blob/master/slug.go#L254) further down.

See hashicorp/terraform#31895

Any chance we could get this one resolved? It's broken all of Terraform 1.3.x for us so far.

It used to work, so it should be a case of reverting out whatever change broken it, right?

We're seeing the same exact issue. Ever since v0.10.0 was released, symlinks are broken. For now, pinning go-slug to v0.9.1 fixes the problem.