-
-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Description

I think you miss the $loop
in your code:
<?php
require __DIR__ . '/vendor/autoload.php';
$loop = React\EventLoop\Factory::create(); #this
$launcher = new Clue\React\Shell\ProcessLauncher($loop);
$shell = $launcher->createDeferredShell('bash');
$shell->execute('echo -n $USER')->then(function ($result) {
var_dump('current user', $result);
});
$shell->execute('env | sort | head -n10')->then(function ($env) {
var_dump('env', $env);
});
$shell->end();
$loop->run(); #and this
Metadata
Metadata
Assignees
Labels
No labels