Skip to content

Skip chmod on Windows to avoid unnecessary permission changes #186

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 27, 2025

Conversation

urufudev
Copy link
Contributor

This pull request prevents chmod from running on Windows, as it is not required and can be skipped safely.

Changes made:
Added a condition to check the operating system (PHP_OS).

chmod($target, $perms); now only executes on non-Windows systems.

Reason for the change:
Since Windows does not support Unix-style file permissions, calling chmod is unnecessary and has no effect. This update ensures compatibility and avoids redundant function calls on Windows environments.

Testing & Impact:
This change does not affect Linux/macOS functionality.

It improves Windows compatibility by preventing unnecessary operations.

@SRWieZ SRWieZ self-requested a review March 26, 2025 13:53
@simonhamp simonhamp merged commit f60f497 into NativePHP:main Mar 27, 2025
56 of 76 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants