Merge pull request #8462 from BR0kEN-/issues/8461
#8461: [ZipDownloader] Print `unzip` exit code when the command is failedpull/8475/head
commit
295cc8bc90
|
@ -105,11 +105,11 @@ class ZipDownloader extends ArchiveDownloader
|
|||
$command = 'unzip -qq '.$overwrite.' '.ProcessExecutor::escape($file).' -d '.ProcessExecutor::escape($path);
|
||||
|
||||
try {
|
||||
if (0 === $this->process->execute($command, $ignoredOutput)) {
|
||||
if (0 === $exitCode = $this->process->execute($command, $ignoredOutput)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
$processError = new \RuntimeException('Failed to execute ' . $command . "\n\n" . $this->process->getErrorOutput());
|
||||
$processError = new \RuntimeException('Failed to execute ('.$exitCode.') '.$command."\n\n".$this->process->getErrorOutput());
|
||||
} catch (\Exception $e) {
|
||||
$processError = $e;
|
||||
}
|
||||
|
|
|
@ -184,7 +184,7 @@ class ZipDownloaderTest extends TestCase
|
|||
|
||||
/**
|
||||
* @expectedException \Exception
|
||||
* @expectedExceptionMessage Failed to execute unzip
|
||||
* @expectedExceptionMessage Failed to execute (1) unzip
|
||||
*/
|
||||
public function testSystemUnzipOnlyFailed()
|
||||
{
|
||||
|
@ -310,7 +310,7 @@ class ZipDownloaderTest extends TestCase
|
|||
|
||||
/**
|
||||
* @expectedException \Exception
|
||||
* @expectedExceptionMessage Failed to execute unzip
|
||||
* @expectedExceptionMessage Failed to execute (1) unzip
|
||||
*/
|
||||
public function testWindowsFallbackFailed()
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue