fix: error when source doesn't exist

This commit is contained in:
Kévin Dunglas 2023-08-21 22:16:42 +02:00 committed by Jerry Ma
parent f4327c8c81
commit 4c46f6a762

View File

@ -253,6 +253,12 @@ class Downloader
$source = Config::getSource($name);
}
if ($source === null) {
logger()->warning('Source {name} unknown. Skipping.', ['name' => $name]);
return;
}
// load lock file
if (!file_exists(DOWNLOAD_PATH . '/.lock.json')) {
$lock = [];