*** AddOnActionTrait.php Fri Mar 29 00:20:34 2024
--- AddOnActionTrait.php Fri Mar 29 00:20:48 2024
***************
*** 280,285 ****
--- 280,290 ----
public function isAZipFile($pathToZip)
{
+ if ($pathToZip === '-')
+ {
+ return true;
+ }
+
if (strtolower(pathinfo($pathToZip, PATHINFO_EXTENSION)) == 'zip'
&& file_exists($pathToZip) && is_readable($pathToZip)
)
***************
*** 294,299 ****
--- 299,313 ----
{
/** @var \XF\Repository\AddOn $addOnRepo */
$addOnRepo = \XF::repository('XF:AddOn');
+
+ if ($zipFile === '-')
+ {
+ $tempZip = \XF\Util\File::getTempFile();
+ $fp = fopen($tempZip, 'w');
+ stream_copy_to_stream(STDIN, $fp);
+ fclose($fp);
+ $zipFile = $tempZip;
+ }
if (!$addOnRepo->canInstallFromArchive($error, true))
{