* Download core WordPress files.
*
* ## OPTIONS
- *
+ *
* [--path=<path>]
* : Specify the path in which to install WordPress.
*
}
private static function _request( $method, $url, $headers = array(), $options = array() ) {
+ // cURL can't read Phar archives
+ if ( 0 === strpos( WP_CLI_ROOT, 'phar://' ) ) {
+ $options['verify'] = sys_get_temp_dir() . '/wp-cli-cacert.pem';
+
+ copy(
+ WP_CLI_ROOT . '/vendor/rmccue/requests/library/Requests/Transport/cacert.pem',
+ $options['verify']
+ );
+ }
+
try {
return Requests::get( $url, $headers, $options );
} catch( Requests_Exception $ex ) {
}
add_file( $phar, './vendor/autoload.php' );
+add_file( $phar, './vendor/rmccue/requests/library/Requests/Transport/cacert.pem' );
$phar->setStub( <<<EOB
#!/usr/bin/env php