mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-12 15:06:27 +00:00
fix(rubygems): throw registry-failure when failing to download
This commit is contained in:
parent
7f509b3dbe
commit
9999f47bf6
1 changed files with 3 additions and 3 deletions
|
@ -21,13 +21,13 @@ async function updateRubyGemsVersions() {
|
||||||
logger.debug('Rubygems: Fetching rubygems.org versions');
|
logger.debug('Rubygems: Fetching rubygems.org versions');
|
||||||
newLines = (await got(url, options)).body;
|
newLines = (await got(url, options)).body;
|
||||||
} catch (err) /* istanbul ignore next */ {
|
} catch (err) /* istanbul ignore next */ {
|
||||||
if (err.statusCode === 416) {
|
if (err.statusCode !== 416) {
|
||||||
logger.debug('Rubygems: No update');
|
|
||||||
} else {
|
|
||||||
logger.warn({ err }, 'Rubygems error - resetting cache');
|
logger.warn({ err }, 'Rubygems error - resetting cache');
|
||||||
contentLength = 0;
|
contentLength = 0;
|
||||||
packageReleases = Object.create(null); // Because we might need a "constructor" key
|
packageReleases = Object.create(null); // Because we might need a "constructor" key
|
||||||
|
throw new Error('registry-failure');
|
||||||
}
|
}
|
||||||
|
logger.debug('Rubygems: No update');
|
||||||
lastSync = new Date();
|
lastSync = new Date();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue