Permalink
Browse files

Works on Linux when proc_open misses

  • Loading branch information...
1 parent 5e12da0 commit fbf9a27132f028ed2c25f1b76347552c8c598e66 @beberlei beberlei committed Nov 19, 2012
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/Composer/Util/Filesystem.php
View
8 src/Composer/Util/Filesystem.php
@@ -152,11 +152,11 @@ public function rename($source, $target)
return;
}
- if (defined('PHP_WINDOWS_VERSION_BUILD')) {
- if (!function_exists('proc_open')) {
- return $this->copyThenRemove($source, $target);
- }
+ if (!function_exists('proc_open')) {
+ return $this->copyThenRemove($source, $target);
+ }
+ if (defined('PHP_WINDOWS_VERSION_BUILD')) {
// Try to copy & delete - this is a workaround for random "Access denied" errors.
$command = sprintf('xcopy %s %s /E /I /Q', escapeshellarg($source), escapeshellarg($target));
if (0 === $this->processExecutor->execute($command)) {

0 comments on commit fbf9a27

Please sign in to comment.