Conditions | 3 |
Paths | 3 |
Total Lines | 11 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
15 | protected function createLink($source, $target) |
||
16 | { |
||
17 | if (!Platform::isWindows()) { |
||
18 | throw new RuntimeException("Cannot create junction on non-windows environment"); |
||
19 | } |
||
20 | $this->filesystem->junction($source, $target); |
||
21 | |||
22 | // Check if this command succeeded |
||
23 | $success = $this->filesystem->isJunction($target); |
||
24 | if (!$success) { |
||
25 | throw new RuntimeException("Could not create symlink at $target"); |
||
26 | } |
||
29 |