Skip to content

Commit 2925c93

Browse files
authored
Merge pull request #239 from odan/windows
Fix command issues with windows
2 parents ea0b698 + 7111c07 commit 2925c93

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/CommandRunner/CommandRunner.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,11 @@ class CommandRunner
2121
*/
2222
public function run($command)
2323
{
24-
exec($command.' 2>&1', $output, $returnValue);
24+
if (PHP_OS === 'WINNT') {
25+
exec($command, $output, $returnValue);
26+
} else {
27+
exec($command . ' 2>&1', $output, $returnValue);
28+
}
2529

2630
$output = implode(PHP_EOL, $output);
2731

0 commit comments

Comments
 (0)