From f98f093f7bc002e13e4b7e1e163fec4cac211506 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Mon, 11 Feb 2013 22:55:14 +0100 Subject: [PATCH] Minor code reformatting and error message clarification --- src/Composer/Downloader/ZipDownloader.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/Composer/Downloader/ZipDownloader.php b/src/Composer/Downloader/ZipDownloader.php index 1246cad52..d2fba3e34 100644 --- a/src/Composer/Downloader/ZipDownloader.php +++ b/src/Composer/Downloader/ZipDownloader.php @@ -37,7 +37,6 @@ class ZipDownloader extends ArchiveDownloader // try to use unzip on *nix if (!defined('PHP_WINDOWS_VERSION_BUILD')) { - $command = 'unzip '.escapeshellarg($file).' -d '.escapeshellarg($path); if (0 === $this->process->execute($command, $ignoredOutput)) { return; @@ -56,12 +55,11 @@ class ZipDownloader extends ArchiveDownloader $iniMessage = 'A php.ini file does not exist. You will have to create one.'; } - $error = "Could not decompress the archive, enable the PHP zip extension or install unzip.\n". - $iniMessage . "\n" . $processError; + $error = "Could not decompress the archive, enable the PHP zip extension or install unzip.\n" + . $iniMessage . "\n" . $processError; if (!defined('PHP_WINDOWS_VERSION_BUILD')) { - $error = "You need the zip extension enabled to use the ZipDownloader.\n". - $iniMessage; + $error = "Could not decompress the archive, enable the PHP zip extension.\n" . $iniMessage; } throw new \RuntimeException($error);