Skip to content

Commit

Permalink
Merge pull request #70 from wp-cli/fake-v1-for-v2-framework
Browse files Browse the repository at this point in the history
Fake v1 version for v2 framework for now
  • Loading branch information
gitlost authored Feb 9, 2018
2 parents b0f0e59 + 465b9ec commit bb8b02d
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/Package_Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -855,7 +855,14 @@ private function get_composer_json_path() {
*/
private static function get_wp_cli_version_composer() {
preg_match( '#^[0-9\.]+(-(alpha|beta)[^-]{0,})?#', WP_CLI_VERSION, $matches );
return isset( $matches[0] ) ? $matches[0] : '';
$version = isset( $matches[0] ) ? $matches[0] : '';
if ( 0 === strpos( $version, '2' ) ) {
// Fake a v1.x.x version for v2.x.x framework for now, as the
// command package are not yet accepting v2.x.x to meet their
// dependency requirements.
$version = '1.99.99-alpha';
}
return $version;
}

/**
Expand Down

0 comments on commit bb8b02d

Please sign in to comment.