-
Notifications
You must be signed in to change notification settings - Fork 3
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
MAGEFILE_ENABLE_COLOR breaks mage-select #4
Comments
The current solution in my shell is to simply create a function to use instead like this:
|
Thank you for reporting this. You're right, it's quiet here because I'm currently not using But I think this is quite easy to fix. I have to reproduce this first ... hope to get back to you soon 🤞🏻 |
Should be fixed in https://github.com/iwittkau/mage-select/releases/tag/v1.1.0 Happy maging 🧙♀️ If you still encounter problems, please re-open. |
My hero! |
Would love to hear what you are using if not mage now, back to bash scripts? I don't know if I could do that since I love Go so much ;-) Feel free to ping me on twitter for off-topic discussion if you like. It's linked on my profile page. cheers! |
- fixes #4 as promptui still was picking up the incorrect color escape sequences before attempting to pass to mage invocation
@iwittkau Thanks for the fix! Since the fix f1a5309 resets Here is example how to correct the func init() {
var err error
// Reset coloring only if not already enabled/disabled e.g. by mage-select
disableColor := strings.TrimSpace(os.Getenv("MAGEFILE_ENABLE_COLOR"))
if disableColor == "" {
err = os.Setenv("MAGEFILE_ENABLE_COLOR", "1")
if err != nil {
panic(err)
}
}
...
}
I'd love to hear that too, for the same reasons. I have been using Mage as a general-purpose replacement for Bash scripting and I can't imagine myself going back to Bash. Sad to read @sheldonhull 's magefile/mage#289 (comment) |
Still using. It's stable and well featured so best option right now for me in Go. That said I hope to see maintenance pick back up someday. I don't have any issues with color right now with the current fixes in place. |
I know there's not a lot of activity on this, but want to capture this issue as it caused me to stop using it for a while.
If
MAGEFILE_ENABLE_COLOR=1 mage-select
is used, when the command is passed through it incorrectly escapes and won't work. When color is disabled it works fine.The end target for something like
mage go:doctor
ends up being"\x1b[36mgo:doctor\x1b[0m"
.The text was updated successfully, but these errors were encountered: