diff --git a/src/SPC/command/BuildCliCommand.php b/src/SPC/command/BuildCliCommand.php index b45ef0b3..01d4e0e7 100644 --- a/src/SPC/command/BuildCliCommand.php +++ b/src/SPC/command/BuildCliCommand.php @@ -77,12 +77,23 @@ class BuildCliCommand extends BuildCommand if (!empty($this->input->getOption('with-hardcoded-ini'))) { $indent_texts['Hardcoded INI'] = $this->input->getOption('with-hardcoded-ini'); } - $this->printFormatInfo($indent_texts); + if ($this->input->getOption('disable-opcache-jit')) { + $indent_texts['Opcache JIT'] = 'disabled'; + } + try { + $ver = $builder->getPHPVersion(); + $indent_texts['PHP Version'] = $ver; + } catch (\Throwable) { + if (($ver = $builder->getPHPVersionFromArchive()) !== false) { + $indent_texts['PHP Version'] = $ver; + } + } if (!empty($not_included)) { - logger()->warning('Some extensions will be enabled due to dependencies: ' . implode(',', $not_included)); + $indent_texts['Extra Exts (' . count($not_included) . ')'] = implode(', ', $not_included); } - logger()->info('Build will start after 2s ...'); + $this->printFormatInfo($indent_texts); + logger()->notice('Build will start after 2s ...'); sleep(2); if ($this->input->getOption('with-clean')) { diff --git a/src/SPC/store/FileSystem.php b/src/SPC/store/FileSystem.php index 8da010e2..7e5411ab 100644 --- a/src/SPC/store/FileSystem.php +++ b/src/SPC/store/FileSystem.php @@ -227,8 +227,12 @@ class FileSystem { $dir = self::convertPath($dir); // 不是目录不扫,直接 false 处理 + if (!file_exists($dir)) { + logger()->debug('Scan dir failed, no such file or directory.'); + return false; + } if (!is_dir($dir)) { - logger()->warning('Scan dir failed, no such directory.'); + logger()->warning('Scan dir failed, not directory.'); return false; } logger()->debug('scanning directory ' . $dir); @@ -317,8 +321,12 @@ class FileSystem $dir = FileSystem::convertPath($dir); logger()->debug('Removing path recursively: "' . $dir . '"'); // 不是目录不扫,直接 false 处理 + if (!file_exists($dir)) { + logger()->debug('Scan dir failed, no such file or directory.'); + return false; + } if (!is_dir($dir)) { - logger()->warning('Scan dir failed, no such directory.'); + logger()->warning('Scan dir failed, not directory.'); return false; } logger()->debug('scanning directory ' . $dir);