toolkit icon indicating copy to clipboard operation
toolkit copied to clipboard

Fix regression, auto readlink on symlinks again

Open robherley opened this issue 1 year ago • 0 comments

With the changes introduced in:

  • https://github.com/actions/toolkit/pull/1771

Which was meant to resolve:

  • https://github.com/actions/upload-artifact/issues/485

We introduced a new bug:

  • https://github.com/actions/upload-artifact/issues/590

We had a slight regression with symlinks. The typical behavior is that they are auto-resolved and the contents of the zip are added at the link's location. With the lazy-stream wrapper being used, it did not resolve the symlinks.

This PR switches our stat to an lstat, and we can check for a symbolic link, then resolve it, when we add the file to the zip archive.

robherley avatar Sep 20 '24 21:09 robherley