fix: handle stdio properly

This commit is contained in:
2025-08-17 13:55:24 +02:00
parent 4ae0545ab4
commit 5f6f5bf04b
15 changed files with 311 additions and 120 deletions

View File

@@ -11,7 +11,7 @@ use Nih\CommandBuilder\Stdio;
require_once __DIR__ . '/vendor/autoload.php';
$child = (new Command('/usr/bin/cat'))
->stdin(Stdio::piped('r'))
->stdin(Stdio::piped())
->spawn(shell: false);
$child->stdin?->write('Hello, this is pretty cool.');