Skip to content

Commit

Permalink
Merge branch 'wip/support-uploading-packages-update-manager-changes' …
Browse files Browse the repository at this point in the history
…of github.com:wintercms/winter into wip/support-uploading-packages-update-manager-changes
  • Loading branch information
jaxwilko committed Jan 5, 2025
2 parents 729e46e + e3aeefa commit 6900cae
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions modules/system/classes/extensions/source/LocalSource.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ public function __construct(
}

/**
* @throws ApplicationException
* @throws ApplicationException if the provided path doesn't exist
*/
public static function fromZip(string $path): array
{
if (!File::exists($path)) {
throw new ApplicationException('Zip not found');
throw new ApplicationException("$path doesn't exist");
}

$dir = temp_path(time());
Expand All @@ -51,11 +51,11 @@ public static function fromZip(string $path): array
$sources = [];

foreach ($plugins as $code => $path) {
$sources = new static(static::TYPE_PLUGIN, code: $code, path: $path);
$sources[] = new static(static::TYPE_PLUGIN, code: $code, path: $path);
}

foreach ($themes as $code => $path) {
$sources = new static(static::TYPE_THEME, code: $code, path: $path);
$sources[] = new static(static::TYPE_THEME, code: $code, path: $path);
}

return $sources;
Expand Down

0 comments on commit 6900cae

Please sign in to comment.