Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
omercnet committed Dec 12, 2024
1 parent b2a91df commit 7fbfa3b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions lib/modules/manager/gomod/artifacts.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ describe('modules/manager/gomod/artifacts', () => {

it('runs go mod vendor with gomodVendor', async () => {
fs.readLocalFile.mockResolvedValueOnce('Current go.sum');
fs.readLocalFile.mockResolvedValueOnce(null); // vendor modules filename
fs.readLocalFile.mockResolvedValueOnce('New go.sum');
fs.readLocalFile.mockResolvedValueOnce('New go.mod');

Expand Down
4 changes: 2 additions & 2 deletions lib/modules/manager/gomod/artifacts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,9 @@ export async function updateArtifacts({
const vendorDir = upath.join(goModDir, 'vendor/');
const vendorModulesFileName = upath.join(vendorDir, 'modules.txt');
const useVendor =
config.postUpdateOptions?.includes('gomodVendor') ||
(!config.postUpdateOptions?.includes('gomodSkipVendor') &&
(await readLocalFile(vendorModulesFileName)) !== null);
(await readLocalFile(vendorModulesFileName)) !== null) ||
config.postUpdateOptions?.includes('gomodVendor');
let massagedGoMod = newGoModContent;

if (config.postUpdateOptions?.includes('gomodMassage')) {
Expand Down

0 comments on commit 7fbfa3b

Please sign in to comment.