mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 12:54:52 +08:00
fix in case it's not set
This commit is contained in:
parent
5bc4504e37
commit
e5ea32e9c0
@ -24,7 +24,7 @@ class ClangNativeToolchain implements ToolchainInterface
|
|||||||
{
|
{
|
||||||
foreach (['CC', 'CXX', 'AR', 'LD'] as $env) {
|
foreach (['CC', 'CXX', 'AR', 'LD'] as $env) {
|
||||||
$command = getenv($env);
|
$command = getenv($env);
|
||||||
if (is_file($command)) {
|
if (!$command || is_file($command)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
match (PHP_OS_FAMILY) {
|
match (PHP_OS_FAMILY) {
|
||||||
|
|||||||
@ -24,7 +24,7 @@ class GccNativeToolchain implements ToolchainInterface
|
|||||||
{
|
{
|
||||||
foreach (['CC', 'CXX', 'AR', 'LD'] as $env) {
|
foreach (['CC', 'CXX', 'AR', 'LD'] as $env) {
|
||||||
$command = getenv($env);
|
$command = getenv($env);
|
||||||
if (is_file($command)) {
|
if (!$command || is_file($command)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
match (PHP_OS_FAMILY) {
|
match (PHP_OS_FAMILY) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user