* handle error case where setup is run automated and receives no input on STDIN
This commit is contained in:
Sarjuuk
2025-10-02 16:16:49 +02:00
parent 36aa33ac26
commit bd1f139c2e

View File

@@ -288,7 +288,12 @@ abstract class CLI
continue;
// stream_get_contents is always blocking under WIN - fgets should work similary as php always receives a terminated line of text
$chars = str_split(OS_WIN ? fgets(STDIN) : stream_get_contents(STDIN));
$chars = str_split(OS_WIN ? fgets(STDIN) : stream_get_contents(STDIN));
// $chars can be empty if used non-interactive
if (!$chars)
return false;
$ordinals = array_map('ord', $chars);
if ($ordinals[0] == self::CHR_ESC)