mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-13 07:26:26 +00:00
chore(gomod): better update failure logging
This commit is contained in:
parent
53e3deb7d9
commit
acdd430caf
1 changed files with 5 additions and 0 deletions
|
@ -28,6 +28,11 @@ export function updateDependency({
|
|||
}
|
||||
const depNameNoVersion = getDepNameWithNoVersion(depName);
|
||||
const lines = fileContent.split(newlineRegex);
|
||||
// istanbul ignore if: hard to test
|
||||
if (lines.length <= upgrade.managerData.lineNumber) {
|
||||
logger.warn('go.mod current line no longer exists after update');
|
||||
return null;
|
||||
}
|
||||
const lineToChange = lines[upgrade.managerData.lineNumber];
|
||||
if (
|
||||
!lineToChange.includes(depNameNoVersion) &&
|
||||
|
|
Loading…
Reference in a new issue