Skip to content

fix: color flags not working - #97

Merged
kdabir merged 1 commit into
kdabir:masterfrom
goto-dev-null:fix-colors
Sep 5, 2026
Merged

kdabir merged 1 commit into
kdabir:masterfrom
goto-dev-null:fix-colors

Conversation

@goto-dev-null

Copy link
Copy Markdown
Contributor

Technically it was just the quotes around ${COLOR_OPTS[@]} that were causing the issue, but the [@] is not necessary in this case, afaik, and just makes it harder to read

Made the flag descriptions match #93

Also they were not included in the help output
Seems to make sense to make them match kdabir#93
@kdabir
kdabir merged commit 7adfcc7 into kdabir:master Sep 5, 2026
@kdabir

kdabir commented Sep 5, 2026 •

Copy link
Copy Markdown
Owner

thank for the fix

Confirmed this fixes the bug (COLOR_OPTS was a 1-element array due to the inner quotes at its declaration, so "${COLOR_OPTS[@]}" only ever iterated once over the glued string). This fix works around it via word-splitting on the unquoted expansion — merging as-is.

Nit for later: the more root-cause fix would be at the declaration, COLOR_OPTS=(${COLOR_AUTO} ${COLOR_NEVER} ${COLOR_ALWAYS}) (no inner quotes), which builds a real 3-element array and lets the original "${COLOR_OPTS[@]}" loop work correctly/robustly. Not blocking — will follow up separately.

social4hyq pushed a commit to social4hyq/homebrew-core that referenced this pull request Sep 20, 2026
has 1.6.0

Created-by: HarmonybrewBot
Commit-by: HarmonybrewBot
Merged-by: HarmonybrewBot
Description: Created by `brew bump`

---

Created with `brew bump-formula-pr`.<details>
  <summary>release notes</summary>
  <pre>## What's Changed
* update link by @oooooooo in kdabir/has#90
* docs(README): add mise alternate installation documentation by @jylenhof in kdabir/has#92
* feat: added "just" as supported program by @goto-dev-null in kdabir/has#96
* fix: failing unit test assumes dev has `bc` installed by @goto-dev-null in kdabir/has#98
* feat: add shell completions for bash and zsh by @njg7194 in kdabir/has#93
* fix: color flags not working by @goto-dev-null in kdabir/has#97
* Make HAS_ALLOW_UNSAFE case insensitive (closes #35) by @chiliec in kdabir/has#99
* fix: stopped bzip2 from hanging by @goto-dev-null in kdabir/has#94

## New Contributors
* @oooooooo made their first contribution in kdabir/has#90
* @jylenhof made their first contribution in kdabir/has#92
* @goto-dev-null made their first contribution in kdabir/has#96
* @njg7194 made their first contribution in kdabir/has#93
* @chiliec made their first contribution in kdabir/has#99

**Full Changelog**: https://github.com/kdabir/has/compare/v1.5.2...v1.6.0</pre>
  <p>View the full release notes at <a href="https://github.com/kdabir/has/releases/tag/v1.6.0">https://github.com/kdabir/has/releases/tag/v1.6.0</a>.</p>
</details>
<hr>

See merge request: Harmonybrew/homebrew-core!19964
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.

2 participants