Skip to content

Commit

Permalink
fix(gomod): Don't append indirect mark twice (#20479)
Browse files Browse the repository at this point in the history
  • Loading branch information
zharinov authored Feb 20, 2023
1 parent 1991242 commit 43848b7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/modules/manager/gomod/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,10 @@ export function updateDependency({
}

if (depType === 'indirect') {
newLine += ' // indirect';
newLine = newLine.replace(
regEx(/\s*(?:\/\/\s*indirect(?:\s*;)?\s*)*$/),
' // indirect'
);
}

lines[upgrade.managerData.lineNumber] = newLine;
Expand Down

0 comments on commit 43848b7

Please sign in to comment.