Skip to content

Commit 919991e

Browse files
GromNaNLamentXU123
authored andcommitted
phpize: Fail when build files cannot be copied
Both cp calls run in subshells with no status check, and phpize_copy_files is called unconditionally, so phpize exits 0 even when the copy fails. The extension is then configured with stale files left over from a previous run. After a PHP upgrade in place, this silently builds against the previous PHP's php.m4, Makefile.global and run-tests.php. Propagate the failure with "|| exit 1", matching the style already used in phpize_autotools().
1 parent b30ea5e commit 919991e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎scripts/phpize.in‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,8 @@ phpize_copy_files()
148148
{
149149
test -d build || mkdir build
150150

151-
(cd "$phpdir" && cp -f $FILES_BUILD "$builddir"/build)
152-
(cd "$phpdir" && cp -f $FILES "$builddir")
151+
(cd "$phpdir" && cp -f $FILES_BUILD "$builddir"/build) || exit 1
152+
(cd "$phpdir" && cp -f $FILES "$builddir") || exit 1
153153
}
154154

155155
phpize_replace_prefix()

0 commit comments

Comments
 (0)