-
Notifications
You must be signed in to change notification settings - Fork 108
Open
Labels
Description
Laravel Prompts Version
0.3.3
Laravel Version
11.0
PHP Version
8.2
Operating System & Version
linux ubuntu 22.04
Terminal Application
WSL?
Description
Laravel\Prompts\text() and other functions do not work if something is piped into a process's STDIN pipe (and then read via stream_get_contents(STDIN);
ie
use function Laravel\Prompts\text;
$data = stream_get_contents(STDIN);
$desc = text( label: 'Description',
required: TRUE,
placeholder: 'Snippet description',
);
The problem is that NO input field is displayed
If I comment the $data = stream_get_contents(STDIN); line,
the text() works as expected.
Note: I am using laravel/prompts composer package without Laravel !
Steps To Reproduce
use function Laravel\Prompts\text;
$data = stream_get_contents(STDIN);
$desc = text( label: 'Description',
required: TRUE,
placeholder: 'Snippet description',
);