Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure MAGEFILE_VERBOSE set in compiled magefile #300

Merged
merged 2 commits into from Apr 16, 2020

Conversation

axw
Copy link
Contributor

@axw axw commented Apr 15, 2020

When using mage -compile=foo, ensure that passing
-v to the produced binary sets MAGEFILE_VERBOSE.
This is necessary for mg.Verbose() to return the
correct value.

Fixes #248

When using `mage -compile=foo`, ensure that passing
`-v` to the produced binary sets MAGEFILE_VERBOSE.
This is necessary for `mg.Verbose()` to return the
correct value.
Copy link
Member

@natefinch natefinch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for finding this... clearly no one has been using mg.Verbose :) If you could add a separate test for mg.Verbose getting set, that would be perfect.

mage/testdata/compiled/custom.go Outdated Show resolved Hide resolved
... and revert the change to TestVerbose.
@axw
Copy link
Contributor Author

axw commented Apr 16, 2020

I've reverted the change to TestVerbose, and introduced a new target and test.

@axw axw requested a review from natefinch April 16, 2020 09:26
Copy link
Member

@natefinch natefinch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome, thank you!

@natefinch natefinch merged commit cb825cb into magefile:master Apr 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

when using a compiled mage binary, the verbose flag isn't propagated
2 participants