Skip to content

Commit 15af034

Browse files
authored
Report why the sanity check for the cli target failed (#605)
1 parent 1f281cd commit 15af034

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/SPC/builder/unix/UnixBuilderBase.php

+3-2
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,9 @@ protected function sanityCheck(int $build_target): void
143143
if (($build_target & BUILD_TARGET_CLI) === BUILD_TARGET_CLI) {
144144
logger()->info('running cli sanity check');
145145
[$ret, $output] = shell()->execWithResult(BUILD_ROOT_PATH . '/bin/php -r "echo \"hello\";"');
146-
if ($ret !== 0 || trim(implode('', $output)) !== 'hello') {
147-
throw new RuntimeException('cli failed sanity check');
146+
$raw_output = implode('', $output);
147+
if ($ret !== 0 || trim($raw_output) !== 'hello') {
148+
throw new RuntimeException("cli failed sanity check: ret[{$ret}]. out[{$raw_output}]");
148149
}
149150

150151
foreach ($this->exts as $ext) {

0 commit comments

Comments
 (0)