Conditions | 2 |
Paths | 2 |
Total Lines | 13 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
37 | public function execute($command) |
||
38 | { |
||
39 | $cwd = getcwd(); |
||
40 | chdir($this->currentWorkingDirectory); |
||
41 | $process = new Process($command); |
||
42 | $process->enableOutput(); |
||
43 | $process->run(); |
||
44 | if (!$process->isSuccessful()) { |
||
45 | chdir($cwd); |
||
46 | throw new ProcessException($process->getErrorOutput()); |
||
47 | } |
||
48 | chdir($cwd); |
||
49 | } |
||
50 | } |
||
51 |