Skip to content

Commit 25ad3a7

Browse files
authored
Update src/Package_Command.php
1 parent 20a6b69 commit 25ad3a7

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/Package_Command.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -368,8 +368,7 @@ public function install( $args, $assoc_args ) {
368368
// If the composer file does not contain the current package index repository, refresh the repository definition.
369369
if ( empty( $composer_backup_decoded['repositories']['wp-cli']['url'] )
370370
|| self::PACKAGE_INDEX_URL !== $composer_backup_decoded['repositories']['wp-cli']['url']
371-
|| ! isset( $composer_backup_decoded['repositories']['wp-cli']['canonical'] )
372-
|| false !== $composer_backup_decoded['repositories']['wp-cli']['canonical'] ) {
371+
|| ( $composer_backup_decoded['repositories']['wp-cli']['canonical'] ?? true ) !== false ) {
373372
WP_CLI::log( 'Updating package index repository url...' );
374373
$package_args = $this->composer_type_package;
375374
$json_manipulator->addRepository(

0 commit comments

Comments
 (0)