Correct chdir to original dir

This commit is contained in:
crazywhalecc 2025-07-22 12:25:43 +08:00
parent ff30e0f99a
commit 4fc081fcc6
No known key found for this signature in database
GPG Key ID: 1F4BDD59391F2680

View File

@ -284,6 +284,7 @@ class LinuxBuilder extends UnixBuilderBase
$modulesDir = BUILD_MODULES_PATH; $modulesDir = BUILD_MODULES_PATH;
$libphpSo = "{$libDir}/libphp.so"; $libphpSo = "{$libDir}/libphp.so";
$realLibName = 'libphp.so'; $realLibName = 'libphp.so';
$cwd = getcwd();
if (preg_match('/-release\s+(\S+)/', $ldflags, $matches)) { if (preg_match('/-release\s+(\S+)/', $ldflags, $matches)) {
$release = $matches[1]; $release = $matches[1];
@ -325,7 +326,7 @@ class LinuxBuilder extends UnixBuilderBase
} }
} }
} }
chdir(getcwd()); chdir($cwd);
} }
$target = "{$libDir}/{$realLibName}"; $target = "{$libDir}/{$realLibName}";