Skip to content

running mage with GOOS=foo influences the GOOS of the compiled magefile #169

@natefinch

Description

@natefinch

iF you have a target that builds your code and you decide you want to run it with GOOS=windows ... Mage will try to compile the magefile with GOOS=windows, and if you're not on windows, it'll break.

i.e.

GOOS=windows mage build

will compile the magefile itself with GOOS=windows ... and then try to run it and fail if you're not on windows.

We need to isolate mage's own compilation from the standard environment variables, with the possibility of something like MAGEFILE_GOOS for when you want to produce a magefile binary of a specific os/arch.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions