1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-05 06:07:32 +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:
Deltik
2018-02-20 21:05:18 -06:00
parent 7553ce1857
commit 8b07f620f1

View File

@@ -51,9 +51,20 @@ abstract class E107Base extends Base
protected function cleanVCS() protected function cleanVCS()
{ {
$pwd = getcwd(); $descriptorspec = [
chdir(APP_PATH); 1 => ['pipe', 'w'],
exec('git clean -fdx'); 2 => ['pipe', 'w'],
chdir($pwd); ];
$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);
} }
} }