Skip to content

Commit 9f8bbdb

Browse files
committed
fix: zip support
1 parent fe5083d commit 9f8bbdb

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/Support/Zip.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,12 @@ public function ensureDoesntHaveSubdir(string $targetPath): string
167167
$files[] = $file;
168168
}
169169

170+
foreach ($files as $file) {
171+
if (str_contains($file, 'plugin.json') || str_contains($file, 'theme.json')) {
172+
return $targetPath;
173+
}
174+
}
175+
170176
$fileCount = count($files);
171177
if (1 < $fileCount && $fileCount <= 3) {
172178
throw new \RuntimeException("Cannot handle the zip file, zip file count is: {$fileCount}, extract path is: {$targetPath}");

0 commit comments

Comments
 (0)