OSDN Git Service
(root)
/
wvm
/
wvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b57a053
)
The Windows version of tar doesn't play nicely with pipes. This way is more cross...
author
Veered
<lucashansne@gmail.com>
Thu, 18 Jul 2013 23:42:38 +0000
(16:42 -0700)
committer
Veered
<lucashansne@gmail.com>
Thu, 18 Jul 2013 23:42:38 +0000
(16:42 -0700)
php/commands/core.php
patch
|
blob
|
history
diff --git
a/php/commands/core.php
b/php/commands/core.php
index
1efda9f
..
fa31422
100644
(file)
--- a/
php/commands/core.php
+++ b/
php/commands/core.php
@@
-40,8
+40,9
@@
class Core_Command extends WP_CLI_Command {
$silent = WP_CLI::get_config('quiet') || \cli\Shell::isPiped() ?
'--silent ' : '';
-
- $cmd = "curl -f $silent %s | tar xz --strip-components=1 --directory=%s";
+
+ $temp = tempnam(sys_get_temp_dir(), "wp_");
+ $cmd = "curl -f $silent %s > $temp && tar xz --strip-components=1 --directory=%s -f $temp && rm $temp";
WP_CLI::launch( Utils\esc_cmd( $cmd, $download_url, ABSPATH ) );
WP_CLI::success( 'WordPress downloaded.' );