cpanel / elevate

elevate your cPanel&WHM CentOS 7 server to Almalinux 8
https://cpanel.github.io/elevate/
BSD 2-Clause "Simplified" License
45 stars 31 forks source link

Use mv and cp from File::Copy instead of copy and move #524

Closed cPholloway closed 1 month ago

cPholloway commented 1 month ago

Case RE-723: As it turns out, File::Copy provides copy and cp that behave slightly different. The copy and move subs use the umask provided by the running processes shell. The cp and mv try to preserve permissions for the file that is being copied or moved. As such, we should prefer cp and mv over copy and move from File::Copy.

Changelog: Use mv and cp from File::Copy instead of copy and move

By submitting pull requests to this repo, I agree to the Contributor License Agreement which can be found at: https://github.com/cpanel/elevate/blob/main/docs/cPanel-CLA.pdf

cPholloway commented 1 month ago

NOTE: This failure actually shows that elevate succeeded:

https://github.com/cpanel/elevate/actions/runs/11298668305/job/31430465285?pr=524

So I am not going to bother rerunning the CI so that it can get a green check mark (there is a bug in the CI here).

I have filed RE-889 to address the CI issue found here.

davelcpanelnet commented 1 month ago

@cPholloway please update this with elevate/main so we can pass the workflow checks.