Test_isColorEnabled fails in Fedora build system
<!--- Please read this! Before opening a new issue, make sure to search for keywords in the issues filtered by the "bug" label: - https://gitlab.com/gitlab-org/cli/-/issues/?label_name%5B%5D=type%3A%3Abug and verify the issue you're about to submit isn't a duplicate. ---> ### Checklist <!-- Please test the latest versions, that will remove the possibility that you see a bug that is fixed in a newer version. --> - [x] I'm using the latest version of the extension (Run `glab --version`) - [x] Operating system and version: _Fedora Rawhide_ ### Summary <!-- Summarize the bug encountered concisely --> Unit test fails in Fedora's build system: ~~~ --- FAIL: Test_isColorEnabled (0.00s) --- FAIL: Test_isColorEnabled/default (0.00s) color_test.go:15: Error Trace: /builddir/build/BUILD/glab-1.92.1-build/cli-v1.92.1/internal/iostreams/color_test.go:15 Error: Should be true Test: Test_isColorEnabled/default ~~~ ### Environment <!-- on POSIX system (Linux, MacOS), run bash -c 'printf -- "- OS: %s\n- SHELL: %s\n- TERM: %s\n- GLAB: %s" "$(uname -srm)" "$SHELL" "$TERM" "$(glab --version)"' and replace the following section with the result. If you use non-POSIX system, fill in the section manually: - OS: Your operating system including version and architecture (Windows 11 - AMD64, MacOS Sonoma - ARM64) - SHELL: Your shell (bash, fish, zsh, ...) - TERM: Your terminal emulator (Kitty, Xterm2..) - GLAB: result of running `glab --version` (glab version 1.32.0 (2023-08-18)) --> - OS: Fedora Rawhide - SHELL: bash - TERM: - GLAB: 1.92.1 ### Steps to reproduce <!-- How one can reproduce the issue - this is very important --> ### What is the current _bug_ behavior? <!-- What actually happens --> Test always fail ### What is the expected _correct_ behavior? <!-- What you should see instead --> Test shouldn't fail ### Possible fixes <!-- If you can, link to the line of code that might be responsible for the problem --> The "default" subtest assumed no `NO_COLOR` in the process environment but Fedora sets `NO_COLOR` globally. Check `NO_COLOR` and `COLOR_ENABLED` env vars before calling `detectIsColorEnabled()` Will attach MR.
issue