-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Closed
Labels
Description
When running the ls -lsa
command in a shell, it will produce output with colour. However when running the same command in a symfony process the output doesn't have colour. Is there any way I can do this?
$process = new Process('ls -lsa');
$process->start();
// ... do other things
$process->wait(function ($type, $buffer) {
if (Process::ERR === $type) {
echo 'ERR > '.$buffer;
} else {
echo 'OUT > '.$buffer;
}
});