Skip to content

Hugo attempts to download module from GitHub even after it has been downloaded to _vendors folder #12555

@gcushen

Description

@gcushen

Currently, Hugo can attempt to download a module from GitHub even if it has been downloaded to the _vendors folder.

The expected behavior is that Hugo checks if the module in go.mod has been downloaded to the _vendors folder before attempting to access the internet.

This can be a common use case where you have a developer creating a modular Hugo project for a business stakeholder or client, but only the developer should have access to the private Hugo module in the repo, so the module is vendored for the stakeholder/client.

As a workaround, if the private Hugo module is deleted from go.mod then Hugo will use the vendored module. Ideally, it should not require the workaround of the stakeholder/client deleting the module from go.mod as then their go.mod is out of sync with the developer's copy.

What version of Hugo are you using (hugo version)?

$ hugo version 0.126.2

Does this issue reproduce with the latest release?

Yes

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions