Skip to content

Commit 355a2ef

Browse files
Strip git short hash off version comparison
It causes intermittent build failures
1 parent 96d0b61 commit 355a2ef

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)