Skip to content

fix: detect fd-find as fdfind on Debian/Ubuntu#241

Merged
alex-solovyev merged 2 commits intomainfrom
bugfix/fd-detection-debian
Jan 27, 2026
Merged

fix: detect fd-find as fdfind on Debian/Ubuntu#241
alex-solovyev merged 2 commits intomainfrom
bugfix/fd-detection-debian

Conversation

@alex-solovyev
Copy link
Collaborator

@alex-solovyev alex-solovyev commented Jan 27, 2026

Summary

  • Fix fd detection on Debian/Ubuntu where fd-find package installs binary as fdfind, not fd
  • Now checks for both fd and fdfind commands

Problem

On Debian/Ubuntu, after installing fd-find:

  • Binary is named fdfind, not fd
  • Alias is added to shell rc files but not active until shell restart
  • setup.sh incorrectly reports fd as not installed

Solution

Check for both command -v fd and command -v fdfind in setup_file_discovery_tools().

Summary by CodeRabbit

  • Chores
    • Improved setup script compatibility on Debian/Ubuntu: now detects alternative names for the file-search tool, reports the detected version, and suggests creating an alias if needed. Ripgrep checks and existing success/failure messaging remain unchanged.

✏️ Tip: You can customize this high-level summary in your review settings.

On Debian/Ubuntu, the fd-find package installs the binary as 'fdfind',
not 'fd'. The setup script now checks for both commands to correctly
detect when fd is already installed.
@gemini-code-assist
Copy link

Summary of Changes

Hello @alex-solovyev, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request refines the setup.sh script to accurately detect the fd-find utility, particularly addressing a common installation nuance on Debian/Ubuntu where the executable is named fdfind. This change ensures that the setup process correctly identifies the presence of this file discovery tool, preventing false negatives and streamlining environment configuration.

Highlights

  • Improved fd-find detection: The setup script now correctly identifies fd-find on Debian/Ubuntu systems by checking for the fdfind binary, in addition to the standard fd command.
  • Enhanced setup.sh logic: The setup_file_discovery_tools function has been updated to first look for fd, and if not found, then check for fdfind, ensuring proper detection and reporting.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 27, 2026

Walkthrough

Updates setup.sh to detect both fd and Debian/Ubuntu fdfind, report the discovered binary's version, and advise aliasing when appropriate; if neither exists, fd is still registered as missing. Ripgrep checks and existing messaging are unchanged.

Changes

Cohort / File(s) Summary
File Discovery Tool Setup
setup.sh
Adds detection for fd and fdfind naming variants, reports the detected tool's version, checks/notes shell aliasing for Debian (fdfindfd), and leaves ripgrep logic and prior messaging intact.

Sequence Diagram(s)

(omitted)

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

Poem

🐧 fd or fdfind, the script now sees,
Across distros it sails the seas,
Version shown, alias hinted bright,
Setup hums along just right ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: detecting fd-find as fdfind on Debian/Ubuntu systems, which directly addresses the core problem solved by the pull request.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@augmentcode
Copy link

augmentcode bot commented Jan 27, 2026

🤖 Augment PR Summary

Summary: Fixes setup.sh detection of fd on Debian/Ubuntu where fd-find installs the binary as fdfind.
Changes: Updates setup_file_discovery_tools() to accept either fd or fdfind and report the detected version.

🤖 Was this summary useful? React with 👍 or 👎

Copy link

@augmentcode augmentcode bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 1 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

local fd_version
fd_version=$(fd --version 2>/dev/null | head -1 || echo "unknown")
print_success "fd found: $fd_version"
elif command -v fdfind >/dev/null 2>&1; then
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If fdfind exists but fd does not, this reports success even though downstream tooling that invokes fd will still fail in the current shell unless an alias/symlink is configured. Consider warning here (or ensuring the alias setup runs) so fd is actually callable when only fdfind is present.

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

The pull request effectively addresses the issue of fd-find being installed as fdfind on Debian/Ubuntu by adding a check for fdfind. The changes improve the robustness of the setup_file_discovery_tools function. One minor improvement can be made regarding variable declaration for better code clarity.

Comment on lines 735 to 742
if command -v fd >/dev/null 2>&1; then
local fd_version
fd_version=$(fd --version 2>/dev/null | head -1 || echo "unknown")
print_success "fd found: $fd_version"
elif command -v fdfind >/dev/null 2>&1; then
local fd_version
fd_version=$(fdfind --version 2>/dev/null | head -1 || echo "unknown")
print_success "fd found (as fdfind): $fd_version"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The fd_version variable is declared twice, once in the if block and again in the elif block. For better readability and to avoid redundant declarations, consider declaring fd_version once at the beginning of the setup_file_discovery_tools function or just before the if statement.

Suggested change
if command -v fd >/dev/null 2>&1; then
local fd_version
fd_version=$(fd --version 2>/dev/null | head -1 || echo "unknown")
print_success "fd found: $fd_version"
elif command -v fdfind >/dev/null 2>&1; then
local fd_version
fd_version=$(fdfind --version 2>/dev/null | head -1 || echo "unknown")
print_success "fd found (as fdfind): $fd_version"
local fd_version
# Check for fd (fd-find on Debian/Ubuntu installs as fdfind)
if command -v fd >/dev/null 2>&1; then
fd_version=$(fd --version 2>/dev/null | head -1 || echo "unknown")
print_success "fd found: $fd_version"
elif command -v fdfind >/dev/null 2>&1; then
fd_version=$(fdfind --version 2>/dev/null | head -1 || echo "unknown")
print_success "fd found (as fdfind): $fd_version"

@github-actions
Copy link

🔍 Code Quality Report

�[0;35m[MONITOR]�[0m Code Review Monitoring Report

�[0;34m[INFO]�[0m Latest Quality Status:
SonarCloud: 0 bugs, 0 vulnerabilities, 457 code smells

�[0;34m[INFO]�[0m Recent monitoring activity:
Tue Jan 27 02:59:52 UTC 2026: Code review monitoring started
Tue Jan 27 02:59:52 UTC 2026: SonarCloud - Bugs: 0, Vulnerabilities: 0, Code Smells: 457
Tue Jan 27 02:59:52 UTC 2026: Qlty - 0 issues found, auto-formatting applied
Tue Jan 27 02:59:54 UTC 2026: Codacy analysis completed with auto-fixes

📈 Current Quality Metrics

  • BUGS: 0
  • CODE SMELLS: 457
  • VULNERABILITIES: 0

Generated on: Tue Jan 27 03:01:21 UTC 2026


Generated by AI DevOps Framework Code Review Monitoring

…s warning

- Declare fd_version once before if/elif (Gemini suggestion)
- Add warning when fdfind exists but fd alias not active (Augment suggestion)
@sonarqubecloud
Copy link

@github-actions
Copy link

🔍 Code Quality Report

�[0;35m[MONITOR]�[0m Code Review Monitoring Report

�[0;34m[INFO]�[0m Latest Quality Status:
SonarCloud: 0 bugs, 0 vulnerabilities, 457 code smells

�[0;34m[INFO]�[0m Recent monitoring activity:
Tue Jan 27 03:06:59 UTC 2026: Code review monitoring started
Tue Jan 27 03:07:00 UTC 2026: SonarCloud - Bugs: 0, Vulnerabilities: 0, Code Smells: 457
Tue Jan 27 03:07:00 UTC 2026: Qlty - 0 issues found, auto-formatting applied
Tue Jan 27 03:07:02 UTC 2026: Codacy analysis completed with auto-fixes

📈 Current Quality Metrics

  • BUGS: 0
  • CODE SMELLS: 457
  • VULNERABILITIES: 0

Generated on: Tue Jan 27 03:08:26 UTC 2026


Generated by AI DevOps Framework Code Review Monitoring

@alex-solovyev alex-solovyev merged commit c1aee56 into main Jan 27, 2026
9 checks passed
@marcusquinn marcusquinn deleted the bugfix/fd-detection-debian branch February 21, 2026 01:59
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.

1 participant