Conditions | 2 |
Paths | 2 |
Total Lines | 17 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
19 | protected function cloneRepo($url, $dest, $branch) |
||
20 | { |
||
21 | $command = "git clone --branch=$branch $url $dest"; |
||
22 | $this->info("Run \"$command\"."); |
||
|
|||
23 | |||
24 | File::makeDirectory($dest, 0755, true); |
||
25 | |||
26 | $output = []; |
||
27 | exec($command, $output, $returnStatusCode); |
||
28 | |||
29 | if ($returnStatusCode !== 0) { |
||
30 | throw RuntimeException::commandExecutionFailed( |
||
31 | $command, $returnStatusCode |
||
32 | ); |
||
33 | } |
||
34 | |||
35 | $this->info("\"$command\" was successfully ran."); |
||
36 | } |
||
60 |