mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-24 17:35:34 +08:00
use filter var instead of assuming var was defined in .env.ini
This commit is contained in:
@@ -32,7 +32,7 @@ class LinuxBuilder extends UnixBuilderBase
|
|||||||
GlobalEnvManager::init($this);
|
GlobalEnvManager::init($this);
|
||||||
|
|
||||||
// set library path, some libraries need it. (We cannot use `putenv` here, because cmake will be confused)
|
// set library path, some libraries need it. (We cannot use `putenv` here, because cmake will be confused)
|
||||||
if (getenv('SPC_NO_MUSL_PATH') !== '1') {
|
if (!filter_var(getenv('SPC_NO_MUSL_PATH'), FILTER_VALIDATE_BOOLEAN)) {
|
||||||
$this->setOptionIfNotExist('library_path', 'LIBRARY_PATH=/usr/local/musl/lib');
|
$this->setOptionIfNotExist('library_path', 'LIBRARY_PATH=/usr/local/musl/lib');
|
||||||
$this->setOptionIfNotExist('ld_library_path', 'LD_LIBRARY_PATH=/usr/local/musl/lib');
|
$this->setOptionIfNotExist('ld_library_path', 'LD_LIBRARY_PATH=/usr/local/musl/lib');
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user