mirror of
https://github.com/e107inc/e107.git
synced 2025-08-04 13:47:31 +02:00
Reworked E107Base::cleanVCS() to use proc_open()
Maybe works on Windows now? Author doesn't know; author coded this on Linux.
This commit is contained in:
@@ -51,9 +51,20 @@ abstract class E107Base extends Base
|
||||
|
||||
protected function cleanVCS()
|
||||
{
|
||||
$pwd = getcwd();
|
||||
chdir(APP_PATH);
|
||||
exec('git clean -fdx');
|
||||
chdir($pwd);
|
||||
$descriptorspec = [
|
||||
1 => ['pipe', 'w'],
|
||||
2 => ['pipe', 'w'],
|
||||
];
|
||||
$pipes = [];
|
||||
$resource = proc_open('git clean -fdx', $descriptorspec, $pipes, APP_PATH);
|
||||
//$stdout = stream_get_contents($pipes[1]);
|
||||
//$stderr = stream_get_contents($pipes[2]);
|
||||
//foreach ($pipes as $pipe)
|
||||
//{
|
||||
// fclose($pipe);
|
||||
//}
|
||||
//var_dump($stdout);
|
||||
//var_dump($stderr);
|
||||
proc_close($resource);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user