Skip to content

Commit

Permalink
Merge pull request #239 from odan/windows
Browse files Browse the repository at this point in the history
Fix command issues with windows
  • Loading branch information
mnapoli authored Oct 19, 2019
2 parents ea0b698 + 7111c07 commit 2925c93
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/CommandRunner/CommandRunner.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ class CommandRunner
*/
public function run($command)
{
exec($command.' 2>&1', $output, $returnValue);
if (PHP_OS === 'WINNT') {
exec($command, $output, $returnValue);
} else {
exec($command . ' 2>&1', $output, $returnValue);
}

$output = implode(PHP_EOL, $output);

Expand Down

0 comments on commit 2925c93

Please sign in to comment.