mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-08 09:25:35 +08:00
fix in case it's not set
This commit is contained in:
@@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user