Skip to content

Commit

Permalink
Fix version scheme parsing with new version of Docker for Mac
Browse files Browse the repository at this point in the history
  • Loading branch information
Plopix committed Nov 20, 2018
1 parent 2b40332 commit decdda3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Listener/OSXListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ protected function getDockerVersion()
}
list($version, $build) = explode(',', $output[0]);
unset($build);
$result = preg_replace('/([^ ]*) ([^ ]*) ([0-9\\.]*)-([a-zA-z]*)/ui', '$3', $version);
$result = preg_replace('/([^ ]*) ([^ ]*) ([0-9\\.]*)-?([a-zA-z]*)/ui', '$3', $version);
list($major, $minor, $patch) = explode('.', $result);
unset($patch);
$normalizedVersion = (int) $major * 100 + $minor;
Expand Down

0 comments on commit decdda3

Please sign in to comment.