Commit da3d570b authored by ayduns's avatar ayduns

Pass --path setting to Civi - #18

parent 813c5625
......@@ -165,6 +165,13 @@ if ( ! defined( 'CIVICRM_WPCLI_LOADED' ) ) {
return WP_CLI::error( "Unrecognized command - '$command'" );
}
# if --path is set, save for later use by Civi
global $civicrm_paths;
$wp_cli_config = WP_CLI::get_config();
if (!empty($wp_cli_config['path'])) {
$civicrm_paths['cms.root']['path'] = $wp_cli_config['path'];
}
# run command
return $this->{$command_router[ $command ]}();
......
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