mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-14 04:15:35 +08:00
Suggestions
This commit is contained in:
@@ -250,8 +250,7 @@ class DownloadCommand extends BaseCommand
|
|||||||
logger()->warning("No alternative sources found for {$source}, using default alternative source");
|
logger()->warning("No alternative sources found for {$source}, using default alternative source");
|
||||||
$alt_config = array_merge($config, Downloader::getDefaultAlternativeSource($source));
|
$alt_config = array_merge($config, Downloader::getDefaultAlternativeSource($source));
|
||||||
} elseif ($alt_sources === false) {
|
} elseif ($alt_sources === false) {
|
||||||
logger()->error("No alternative sources found for {$source}, skipping alternative download");
|
throw new DownloaderException("No alternative sources found for {$source}, skipping alternative download");
|
||||||
throw $e;
|
|
||||||
} else {
|
} else {
|
||||||
logger()->notice("Trying to download alternative sources for {$source}");
|
logger()->notice("Trying to download alternative sources for {$source}");
|
||||||
$alt_config = array_merge($config, $alt_sources);
|
$alt_config = array_merge($config, $alt_sources);
|
||||||
|
|||||||
@@ -37,7 +37,6 @@ class PackageManager
|
|||||||
Downloader::downloadPackage($pkg_name, $config, $force);
|
Downloader::downloadPackage($pkg_name, $config, $force);
|
||||||
} catch (\Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
if (!$allow_alt) {
|
if (!$allow_alt) {
|
||||||
logger()->error("Download package {$pkg_name} failed: " . $e->getMessage());
|
|
||||||
throw new DownloaderException("Download package {$pkg_name} failed: " . $e->getMessage());
|
throw new DownloaderException("Download package {$pkg_name} failed: " . $e->getMessage());
|
||||||
}
|
}
|
||||||
// if download failed, we will try to download alternative packages
|
// if download failed, we will try to download alternative packages
|
||||||
|
|||||||
Reference in New Issue
Block a user