Skip to content

Commit e08f092

Browse files
committed
Conditionally include directory
1 parent 9ead859 commit e08f092

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

utils/make-phar.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,6 @@ function get_composer_versions( $current_version ) {
228228
->in( WP_CLI_VENDOR_DIR . '/nb/oxymel' )
229229
->in( WP_CLI_VENDOR_DIR . '/psr' )
230230
->in( WP_CLI_VENDOR_DIR . '/seld' )
231-
->in( WP_CLI_VENDOR_DIR . '/marc-mabe/php-enum' ) // required by justinrainbow/json-schema.
232231
->in( WP_CLI_VENDOR_DIR . '/justinrainbow/json-schema' )
233232
->in( WP_CLI_VENDOR_DIR . '/gettext' )
234233
->in( WP_CLI_VENDOR_DIR . '/mck89' )
@@ -244,6 +243,11 @@ function get_composer_versions( $current_version ) {
244243
->exclude( 'composer/composer/src/Composer/Question' )
245244
->exclude( 'composer/composer/src/Composer/Repository/Pear' )
246245
->exclude( 'composer/composer/src/Composer/SelfUpdate' );
246+
247+
// required by justinrainbow/json-schema v6+.
248+
if ( is_dir( WP_CLI_VENDOR_DIR . '/marc-mabe/php-enum' ) ) {
249+
$finder->in( WP_CLI_VENDOR_DIR . '/marc-mabe/php-enum' );
250+
}
247251
}
248252

249253
foreach ( $finder as $file ) {

0 commit comments

Comments
 (0)