mirror of
https://github.com/php/php-src.git
synced 2024-11-23 09:54:15 +08:00
Fail early in *nix build script
Adding one more [1] exit early safeguard in *nix build scripts: Given the initial cd into the build tree fails (the project root), the `buildconf` script exits with non-zero status (failure). Additionally quoting the pathname to cd into and the empty CD_PATH parameter for portability, also for systems that are using a non-portable pathname [2] for the build tree. [1]: https://github.com/php/php-src/pull/16717 [2]: https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_271 Closes GH-16724.
This commit is contained in:
parent
257387b9e5
commit
329890c149
@ -3,7 +3,7 @@
|
||||
VERSION=5.45
|
||||
|
||||
# Go to fileinfo extension directory.
|
||||
cd $(CDPATH= cd -- "$(dirname -- "$0")" && pwd -P)
|
||||
cd "$(CDPATH='' cd -- "$(dirname -- "$0")" && pwd -P)" || exit
|
||||
|
||||
if [ ! -d libmagic.orig ]; then
|
||||
mkdir libmagic.orig
|
||||
|
Loading…
Reference in New Issue
Block a user