Skip to content

Commit b87c4c8

Browse files
authored
Merge pull request #105 from wp-cli/strip-short-has
Strip git short hash off version comparison
2 parents 96d0b61 + 355a2ef commit b87c4c8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

scaffold-package-command.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
};
1717

1818
// Only use command hooks in versions that support them.
19-
if ( version_compare( WP_CLI_VERSION, '1.2.0-alpha', '>=' ) ) {
19+
$wp_cli_version = preg_replace( '#-alpha(.+)#', '-alpha', WP_CLI_VERSION );
20+
if ( version_compare( $wp_cli_version, '1.2.0-alpha', '>=' ) ) {
2021
WP_CLI::add_hook( 'after_add_command:scaffold', $registration );
2122
} else {
2223
$registration();

0 commit comments

Comments
 (0)