Skip to content

Commit

Permalink
Unzipper // only write information about falling back from unzip to Z…
Browse files Browse the repository at this point in the history
…ipArchive and vise versa when running in verbose mode.
  • Loading branch information
Chrico committed May 13, 2022
1 parent 66d4645 commit 37929ef
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/Util/Unzipper.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,11 +146,10 @@ protected function extractWithSystemUnzip(string $file, string $path, bool $isLa
throw $processError;
}

$this->io->writeError(' '.$processError->getMessage());
$this->io->writeError(
' The archive may contain identical file names with different capitalization (which fails on case insensitive filesystems)'
);
$this->io->writeError(' Unzip with unzip command failed, falling back to ZipArchive class');
$message = " <error>" . $processError->getMessage() . "</error>";
$message .= "\n The archive may contain identical file names with different capitalization (which fails on case insensitive filesystems).";
$message .="\n Unzip with unzip command failed, falling back to ZipArchive class.";
$this->io->write($message, true, IOInterface::VERBOSE);

return $this->extractWithZipArchive($file, $path, true);
}
Expand Down Expand Up @@ -218,8 +217,11 @@ protected function extractWithZipArchive(string $file, string $path, bool $isLas
throw $processError;
}

$this->io->writeError(' ' . $processError->getMessage());
$this->io->writeError(' Unzip with ZipArchive class failed, falling back to unzip command');
$message = " <error>" . $processError->getMessage() . "</error>";
$message .= "\n Unzip with ZipArchive class failed, falling back to unzip command.";


$this->io->write($message, true, IOInterface::VERBOSE);

return $this->extractWithSystemUnzip($file, $path, true);
}
Expand Down

0 comments on commit 37929ef

Please sign in to comment.