Skip to content

Conversation

@alies-dev
Copy link
Contributor

@alies-dev alies-dev commented Dec 1, 2025

image

Problem

When deploy:writable runs in acl mode, the code detects macOS ACL support by running:

run("chmod 2>&1; true")

This outputs an error message to the deployment logs:

chmod: missing operand
Try 'chmod --help' for more information.

While the command succeeds (due to ; true), the error message clutters deployment output.

Solution

Since chmod +a is macOS-specific (Linux and FreeBSD use setfacl/getfacl instead), we can directly check the OS:

run("uname -s") === 'Darwin'

This is:

  • Cleaner: No error output in logs
  • More explicit: Clearly documents the intent (macOS detection)
  • Equally reliable: macOS is the only platform supporting chmod +a

References

  • macOS uses chmod +a/-a/=a for ACL management
  • Linux uses setfacl/getfacl (POSIX ACLs)
  • FreeBSD uses setfacl/getfacl despite being BSD-based

Running `chmod` without arguments to detect macOS ACL support outputs
an error: "chmod: missing operand" which clutters deployment logs.

Since `chmod +a` is macOS-specific (Linux and FreeBSD use setfacl),
directly checking `uname -s === 'Darwin'` is cleaner and more reliable
than parsing chmod's error output.
@antonmedv antonmedv merged commit f8e41b6 into deployphp:master Dec 2, 2025
7 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.

2 participants