Skip to content

find: do not double the "find:" prefix on an invalid -type list - #849

Merged
cakebaker merged 1 commit into
uutils:mainfrom
AlejandroCoronadoN:type-list-double-prefix
Aug 21, 2026
Merged

find: do not double the "find:" prefix on an invalid -type list#849
cakebaker merged 1 commit into
uutils:mainfrom
AlejandroCoronadoN:type-list-double-prefix

Conversation

@AlejandroCoronadoN

Copy link
Copy Markdown
Contributor

A -type/-xtype list that ends in a comma prints the find: prefix twice:

$ find . -type f,
find: find: Last file type in list argument to -type is missing, i.e., list is ending on: ','

GNU prints it once:

$ find . -type f,
find: Last file type in list argument to -type is missing, i.e., list is ending on: ','

The message in type_creator hardcodes a leading find: , but the top level error printer already prepends find: {e}. The two sibling messages in the same function (the duplicate type and the missing separator ones) do not hardcode it, so this one is inconsistent. Drop the hardcoded prefix so the output matches GNU and the neighbors.

@codecov

codecov Bot commented Aug 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.29%. Comparing base (42ddfb1) to head (cdb59b2).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #849   +/-   ##
=======================================
  Coverage   92.29%   92.29%           
=======================================
  Files          35       35           
  Lines        7445     7445           
  Branches      388      388           
=======================================
  Hits         6871     6871           
  Misses        433      433           
  Partials      141      141           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions

Copy link
Copy Markdown

Commit cdb59b2 has test result changes:

bfs testsuite:

Test results comparison:
  Current:   TOTAL: 316 / PASSED: 273 / FAILED: 37 / SKIPPED: 6
  Reference: TOTAL: 317 / PASSED: 274 / FAILED: 37 / SKIPPED: 6

Changes from main branch:
  TOTAL: -1
  PASSED: -1
  FAILED: +0

No result in this run (1) - hung, crashed, or renamed:
  ? posix/depth_error (was PASS)

@codspeed-hq

codspeed-hq Bot commented Aug 21, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 20 untouched benchmarks


Comparing AlejandroCoronadoN:type-list-double-prefix (cdb59b2) with main (42ddfb1)

Open in CodSpeed

@cakebaker
cakebaker merged commit 955282d into uutils:main Aug 21, 2026
23 checks passed
@cakebaker

Copy link
Copy Markdown
Contributor

Thanks!

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