diff --git a/src/SPC/command/FetchSourceCommand.php b/src/SPC/command/FetchSourceCommand.php index afc8af5f..38c741b2 100644 --- a/src/SPC/command/FetchSourceCommand.php +++ b/src/SPC/command/FetchSourceCommand.php @@ -214,6 +214,10 @@ class FetchSourceCommand extends BaseCommand */ private function doPatch(): void { + // swow 需要软链接内部的文件夹才能正常编译 + if (!file_exists(SOURCE_PATH . '/php-src/ext/swow')) { + Patcher::patchSwow(); + } // patch 一些 PHP 的资源,以便编译 Patcher::patchPHPDepFiles(); @@ -228,11 +232,6 @@ class FetchSourceCommand extends BaseCommand Patcher::patchDarwinOpenssl11(); } - // swow 需要软链接内部的文件夹才能正常编译 - if (!file_exists(SOURCE_PATH . '/php-src/ext/swow')) { - Patcher::patchSwow(); - } - // 标记 patch 完成,避免重复 patch file_put_contents(SOURCE_PATH . '/.patched', ''); }