Commit 84e5e533 authored by Andrew Hunt's avatar Andrew Hunt

CRM-20148 WP-CLI: extract zipfile even if `destination` is somewhere unusual

parent 72202de3
......@@ -332,7 +332,7 @@ if ( ! defined( 'CIVICRM_WPCLI_LOADED' ) ) {
return WP_CLI::error( 'Existing CiviCRM found. No action taken.' );
}
if ( ! $this->untar( WP_PLUGIN_DIR ) ) {
if ( ! $this->untar( dirname( $plugin_path ) ) ) {
return WP_CLI::error( 'Error extracting tarfile' );
}
} elseif ( $this->getOption( 'zipfile', false ) ) {
......@@ -340,7 +340,7 @@ if ( ! defined( 'CIVICRM_WPCLI_LOADED' ) ) {
return WP_CLI::error( 'Existing CiviCRM found. No action taken.' );
}
if ( ! $this->unzip( WP_PLUGIN_DIR ) ) {
if ( ! $this->unzip( dirname( $plugin_path ) ) ) {
return WP_CLI::error( 'Error extracting zipfile' );
}
} elseif ( $crm_files_present ) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment