From 58338b5e7e7715233d8f3ab9f4b59d406b856c72 Mon Sep 17 00:00:00 2001 From: Alies Lapatsin Date: Mon, 1 Dec 2025 18:06:44 +0100 Subject: [PATCH] fix: detect macOS ACL support using uname instead of chmod output 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. --- recipe/deploy/writable.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipe/deploy/writable.php b/recipe/deploy/writable.php index c90176a45..b591c1b08 100644 --- a/recipe/deploy/writable.php +++ b/recipe/deploy/writable.php @@ -99,8 +99,8 @@ $remoteUser = run('whoami'); } $httpUser = get('http_user'); - if (strpos(run("chmod 2>&1; true"), '+a') !== false) { - // Try OS-X specific setting of access-rights + if (run("uname -s") === 'Darwin') { + // macOS supports chmod +a for ACL management run("$sudo chmod +a \"$httpUser allow delete,write,append,file_inherit,directory_inherit\" $dirs"); run("$sudo chmod +a \"$remoteUser allow delete,write,append,file_inherit,directory_inherit\" $dirs");