diff --git a/src/SPC/builder/unix/UnixBuilderBase.php b/src/SPC/builder/unix/UnixBuilderBase.php index e3364071..94973884 100644 --- a/src/SPC/builder/unix/UnixBuilderBase.php +++ b/src/SPC/builder/unix/UnixBuilderBase.php @@ -362,7 +362,11 @@ abstract class UnixBuilderBase extends BuilderBase ->exec("xcaddy build --output frankenphp {$xcaddyModules}"); if (!$this->getOption('no-strip', false) && file_exists(BUILD_BIN_PATH . '/frankenphp')) { - shell()->cd(BUILD_BIN_PATH)->exec('strip --strip-all frankenphp'); + if (PHP_OS_FAMILY === 'Linux') { + shell()->cd(BUILD_BIN_PATH)->exec('strip --strip-all frankenphp'); + } else { // macOS doesn't understand strip-all + shell()->cd(BUILD_BIN_PATH)->exec('strip -S frankenphp'); + } } } }