Skip to content

Commit 80278a0

Browse files
Copilotswissspidy
andcommitted
Remove redundant file existence check in install_dependencies
Co-authored-by: swissspidy <[email protected]>
1 parent 24e960e commit 80278a0

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

src/Plugin_Command.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1513,11 +1513,6 @@ public function install_dependencies( $args, $assoc_args ) {
15131513
$plugin = $this->fetcher->get_check( $args[0] );
15141514
$file = $plugin->file;
15151515

1516-
// Check if plugin is installed
1517-
if ( ! file_exists( WP_PLUGIN_DIR . '/' . $file ) ) {
1518-
WP_CLI::error( "Plugin '{$args[0]}' is not installed." );
1519-
}
1520-
15211516
// Get dependencies from plugin header
15221517
$plugin_data = get_plugin_data( WP_PLUGIN_DIR . '/' . $file, false, false );
15231518
$dependencies = [];

0 commit comments

Comments
 (0)