Skip to content
This repository was archived by the owner on Mar 27, 2024. It is now read-only.

bug: go mod tidy runs when --mod vendor is set in buffalo build command #255

@venezia

Description

@venezia

Description

Description

so i've noticed that if you do a buffalo build --mod vendor ... you will find that buffalo calls go mod tidy a few times - which may not be desired if you're using a vendor folder (or it wasn't for me)

Expected Behavior

If i'm setting mod to vendor, I probably do not want buffalo to actively tidy things

Actual Behavior

buffalo rungs go mod tidy twice

Potential fix

To Reproduce

Do something like buffalo build --mod vendor -v --static --clean-assets -o /bin/app and watch it download things that are already in the vendor folder.

Additional Context

I created a small patch to the cli where if it detects that the opts.Mod is set to vendor it will skip the go mod tidy calls. Perhaps this is clunky, but at the same time it might be reasonable. Let me know if I should submit it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions