Skip to content
Snippets Groups Projects
Commit f3db0eb6 authored by Rhys Arkins's avatar Rhys Arkins
Browse files

logs: maven log unknown value

parent f276e0c3
No related branches found
No related tags found
No related merge requests found
const { logger } = require('../../logger');
module.exports = {
updateAtPosition,
updateDependency,
};
function updateAtPosition(fileContent, upgrade, endingAnchor = '"') {
const { currentValue, newValue, fileReplacePosition } = upgrade;
const { depName, currentValue, newValue, fileReplacePosition } = upgrade;
const leftPart = fileContent.slice(0, fileReplacePosition);
const rightPart = fileContent.slice(fileReplacePosition);
const versionClosePosition = rightPart.indexOf(endingAnchor);
......@@ -18,6 +20,7 @@ function updateAtPosition(fileContent, upgrade, endingAnchor = '"') {
const replacedPart = versionPart.replace(currentValue, newValue);
return leftPart + replacedPart + restPart;
}
logger.debug({ depName, version, currentValue, newValue }, 'Unknown value');
return null;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment