fix: suppress empty versionScheme warnings

This commit is contained in:
Rhys Arkins 2018-06-03 19:07:59 +02:00
parent 543805e049
commit b367d8030b

View file

@ -7,9 +7,13 @@ const schemes = {
}; };
module.exports = function getVersionScheme(versionScheme) { module.exports = function getVersionScheme(versionScheme) {
if (!versionScheme) {
logger.debug('Missing versionScheme');
return semver;
}
const scheme = schemes[versionScheme]; const scheme = schemes[versionScheme];
if (!scheme) { if (!scheme) {
logger.warn({ versionScheme }, 'Unknown verion scheme'); logger.warn({ versionScheme }, 'Unknown version scheme');
return semver; return semver;
} }
return scheme; return scheme;