fix phar patch

This commit is contained in:
crazywhalecc
2023-05-01 12:50:01 +08:00
parent 85ac553ded
commit 280284e4c2
5 changed files with 17 additions and 29 deletions

View File

@@ -218,7 +218,7 @@ class LinuxBuilder extends BuilderBase
}
if ($this->phar_patched) {
shell()->cd(SOURCE_PATH . '/php-src')->exec('patch -p1 -R < sapi/micro/patches/phar.patch');
SourcePatcher::patchMicro(['phar'], true);
}
}
@@ -255,12 +255,7 @@ class LinuxBuilder extends BuilderBase
}
if ($this->getExt('phar')) {
$this->phar_patched = true;
try {
shell()->cd(SOURCE_PATH . '/php-src')->exec('patch -p1 < sapi/micro/patches/phar.patch');
} catch (RuntimeException $e) {
logger()->error('failed to patch phat due to patch exit with code ' . $e->getCode());
$this->phar_patched = false;
}
SourcePatcher::patchMicro(['phar']);
}
shell()->cd(SOURCE_PATH . '/php-src')