Skip to content

Commit 52a623f

Browse files
committed
Suggestions
1 parent abd7d3c commit 52a623f

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

src/SPC/command/DownloadCommand.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,8 +250,7 @@ public function handle(): int
250250
logger()->warning("No alternative sources found for {$source}, using default alternative source");
251251
$alt_config = array_merge($config, Downloader::getDefaultAlternativeSource($source));
252252
} elseif ($alt_sources === false) {
253-
logger()->error("No alternative sources found for {$source}, skipping alternative download");
254-
throw $e;
253+
throw new DownloaderException("No alternative sources found for {$source}, skipping alternative download");
255254
} else {
256255
logger()->notice("Trying to download alternative sources for {$source}");
257256
$alt_config = array_merge($config, $alt_sources);

src/SPC/store/PackageManager.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ public static function installPackage(string $pkg_name, ?array $config = null, b
3737
Downloader::downloadPackage($pkg_name, $config, $force);
3838
} catch (\Throwable $e) {
3939
if (!$allow_alt) {
40-
logger()->error("Download package {$pkg_name} failed: " . $e->getMessage());
4140
throw new DownloaderException("Download package {$pkg_name} failed: " . $e->getMessage());
4241
}
4342
// if download failed, we will try to download alternative packages

0 commit comments

Comments
 (0)