In my build system using a PHP script I’m trying to capture the output of a command so I can filter the results but ST is always capturing the output somehow and displaying it.
For example the build command:
{
"cmd": ["php", "$packages/FPC/build.php", "$file", "$project_path"],
}
then a call to exec() in build.php:
exec($command, $results, $exit_code);
Usually this will not print anything because the results are captured in $results but in ST all the output is printed in the console automatically.
Does anyone know why this may be? I tried using popen() and reading the file handle also but the same thing happens, i.e. the output is read by ST bypassing the PHP script.