Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: allow relative symlinks to directories when using build staging (#…
…6430) * fix: allow relative symlinks to directories when using build staging Allows using relative symlinks to directories and files when using build staging. The goal is to reproduce symlinks in the target directory as-is, without having to resolve them. The user would be responsible for making sure that both the relative symlink as well as the target directory are included in the action. If the symlink points to a file or directory outside the actions's source path, this throws an error. To avoid this becoming a breaking change, we keep the old behaviour if the symlink points to a file. In that case, we resolve the symlink and copy the target file. If the target file is outside the action's source or build directory, log a warning. In a future 0.14 release of Garden, we should remove that branch, only reproduce symlinks (without resolving them recursively) and throw an error if the link is out of bounds. Fixes #2382 Co-authored-by: Thorarinn Sigurdsson <[email protected]> * test: add additional test for the error Co-authored-by: vova <[email protected]> * refactor: rename param object property To keep more precise naming. * refactor: introduce param object for constructor * refactor: introduce param object for factory method * chore: declare non re-assignable props as readonly * refactor: named type for standard stats callback * refactor: named type for resolve symlink callback stats callback * refactor: param object for resolve symlink callback * fix: restore accidentally deleted condition check Co-authored-by: Steffen Neubauer <[email protected]> --------- Co-authored-by: Thorarinn Sigurdsson <[email protected]> Co-authored-by: vova <[email protected]> Co-authored-by: Vladimir Vagaytsev <[email protected]>
- Loading branch information