Skip to content

Commit

Permalink
fix: support symlinks in artifact untar
Browse files Browse the repository at this point in the history
Signed-off-by: Steven White <swhitewvu24@gmail.com>
  • Loading branch information
swhite24 committed Nov 2, 2022
1 parent eddb1b7 commit 6b2178c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions workflow/executor/executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -892,6 +892,11 @@ func untar(tarPath string, destPath string) error {
return err
}
switch header.Typeflag {
case tar.TypeSymlink:
err := os.Symlink(header.Linkname, target)
if err != nil {
return err
}
case tar.TypeReg:
f, err := os.OpenFile(target, os.O_CREATE|os.O_RDWR, os.FileMode(header.Mode))
if err != nil {
Expand Down

0 comments on commit 6b2178c

Please sign in to comment.