瀏覽代碼

Since there is no solution for non-unix (for now), remove the condition

Pavel Puchkin 11 年之前
父節點
當前提交
c598fdb0f5
共有 1 個文件被更改,包括 7 次插入12 次删除
  1. 7 12
      src/Composer/Downloader/GzipDownloader.php

+ 7 - 12
src/Composer/Downloader/GzipDownloader.php

@@ -36,20 +36,15 @@ class GzipDownloader extends ArchiveDownloader
 
     protected function extract($file, $path)
     {
-        $processError = null;
+        $targetFile = $path . '/' . basename(substr($file, 0, -3));
+        $command = 'gzip -cd ' . escapeshellarg($file) . ' > ' . escapeshellarg($targetFile);
 
-        // Try to use gunzip on *nix
-        if (!defined('PHP_WINDOWS_VERSION_BUILD')) {
-            $targetFile = $path . '/' . basename(substr($file, 0, -3));
-            $command = 'gzip -cd ' . escapeshellarg($file) . ' > ' . escapeshellarg($targetFile);
-
-            if (0 === $this->process->execute($command, $ignoredOutput)) {
-                return;
-            }
-
-            $processError = 'Failed to execute ' . $command . "\n\n" . $this->process->getErrorOutput();
-            throw new \RuntimeException($processError);
+        if (0 === $this->process->execute($command, $ignoredOutput)) {
+            return;
         }
+
+        $processError = 'Failed to execute ' . $command . "\n\n" . $this->process->getErrorOutput();
+        throw new \RuntimeException($processError);
     }
 
     /**