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

option --no-colors is not interpreted anymore - regression with MR 2187 #2218

Closed
Benoit12345 opened this issue Dec 5, 2024 · 2 comments
Closed
Labels

Comments

@Benoit12345
Copy link

Describe the bug
Since the version 4.44.4/4.44.5, the MR 2187 introduces an issue: the option "--no-colors" or "-M" is not used anymore.

Version of yq: 4.44.4/4.44.5
Operating system: linux
Installed via: docker

Input Yaml
any valid yaml

Command
The command you ran with issue (legacy command -> only '--no-colors' option):

docker run --rm -it -v /home/api:/api -w /api --security-opt=no-new-privileges --cap-drop all --network none mikefarah/yq:4.44.5 eval-all --no-colors '. as $item ireduce ({}; . * $item)' ./swagger1.yaml ./swagger2.yaml

The command you ran without issue (NO_COLOR is set + '--no-colors' option) :

docker run --rm -it -v /home/api:/api -w /api -e NO_COLOR=1 --security-opt=no-new-privileges --cap-drop all --network none mikefarah/yq:4.44.5 eval-all --no-colors '. as $item ireduce ({}; . * $item)' ./swagger1.yaml ./swagger2.yaml

Actual behavior

If there's only the '--no-colors' option, the output has colors

Expected behavior

If there's only the '--no-colors' option, the output mustn't have colors (legacy behavior -> compatibility)

@Benoit12345 Benoit12345 changed the title option --no-colors is not interpreted anymore - regression with [MR 2187](https://github.com/mikefarah/yq/pull/2187) option --no-colors is not interpreted anymore - regression with MR 2187 Dec 5, 2024
@mikefarah
Copy link
Owner

doh! Thanks for raising, will fix

mikefarah added a commit that referenced this issue Dec 7, 2024
@mikefarah
Copy link
Owner

Fixed in 4.4.6

tmeijn pushed a commit to tmeijn/dotfiles that referenced this issue Dec 9, 2024
This MR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [mikefarah/yq](https://github.com/mikefarah/yq) | patch | `v4.44.5` -> `v4.44.6` |

MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot).

**Proposed changes to behavior should be submitted there as MRs.**

---

### Release Notes

<details>
<summary>mikefarah/yq (mikefarah/yq)</summary>

### [`v4.44.6`](https://github.com/mikefarah/yq/releases/tag/v4.44.6)

[Compare Source](mikefarah/yq@v4.44.5...v4.44.6)

-   Fixed deleting items in array bug [#&#8203;2027](mikefarah/yq#2027), [#&#8203;2172](mikefarah/yq#2172); Thanks [@&#8203;jandubois](https://github.com/jandubois)
    -   Docker image for armv7 / raspberry pi3, Thanks [@&#8203;brianegge](https://github.com/brianegge)
    -   Fixed no-colors regression [#&#8203;2218](mikefarah/yq#2218)
    -   Fixed various panic scenarios [#&#8203;2211](mikefarah/yq#2211)
    -   Bumped dependencies

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this MR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box

---

This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40NDAuNyIsInVwZGF0ZWRJblZlciI6IjM3LjQ0MC43IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJSZW5vdmF0ZSBCb3QiXX0=-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants