fileutils
fileutils copied to clipboard
FileUtils.cp_r uses unsupported options on macOS causing issues with symbolic links
The illegal options are -r instead of -R and --remove-destination instead of -f
Details: While -r does not seem to be an issue on RHEL 9 it is on macOS 11. Here is an excerpt from the macOS cp man page:
COMPATIBILITY Historic versions of the cp utility had a -r option. This implementation supports that option; however, its use is strongly discouraged, as it does not correctly copy special files, symbolic links, or fifo's.
--remove-destination functionality should be achieved via -f as the mode will change using -R if the existing file has a different mode then the source