tonhowtf/omniget · error

Everything (es.exe) nao encontrado

Error message

Everything (es.exe) nao encontrado

What it means

On Windows, search() shells out to Everything's command-line client es.exe; if es_path() cannot locate it the search cannot run at all, so this error is returned. es.exe is a separate download from the Everything service.

Solutions

  1. Install Everything from voidtools.com and download es.exe, placing it in PATH
  2. Verify with `es -get-result-count something` in a terminal that es.exe works
  3. Add es.exe's folder to PATH or to the location es_path() checks, then retry
Defensive patterns

Strategy: fallback

Validate before calling

// windows check before searching
let es_available = which::which("es").is_ok();

Try / catch

match file_search::search(&q, folder, limit).await {
    Ok(hits) => hits,
    Err(e) if e.to_string().contains("es.exe") => fallback_walk_search(&q, folder),
    Err(e) => return Err(e),
}

Prevention

When it happens

Trigger: Calling search() on Windows when Everything (or its es.exe CLI) is not installed, not in PATH, or not at the configured location.

Common situations: Fresh machine without Everything installed; Everything installed but es.exe downloaded separately and never placed in PATH; portable Everything install with no registry entry.

Understand the failure class

Background: "not installed", "pip install", "required for": how missing-dependency errors surface across open-source libraries — this error's family across 34 libraries.

Related errors


AI-assisted analysis of tonhowtf/omniget@8600b91f42 (2026-09-12). Data as JSON: /api/errors/7e867589766e5db8. Report an issue: GitHub.

Appendix: source

Thrown at src-tauri/omniget-core/src/core/tools/file_search.rs:91

#[derive(Debug, Clone, Serialize)]
pub struct Hit {
    pub path: String,
    pub size: Option<u64>,
    pub is_dir: bool,
}

pub async fn search(query: &str, folder: &str, limit: usize) -> anyhow::Result<Vec<Hit>> {
    let q = query.trim();
    if q.is_empty() {
        return Ok(vec![]);
    }
    let limit = limit.clamp(1, 2000);
    let output;
    #[cfg(target_os = "windows")]
    {
        let es = es_path()
            .await
            .ok_or_else(|| anyhow!("Everything (es.exe) nao encontrado"))?;
        let mut cmd = crate::core::process::command(&es);
        cmd.args(["-n", &limit.to_string()]);
        if !folder.trim().is_empty() {
            cmd.args(["-path", folder.trim()]);
        }
        cmd.arg(q);
        output = cmd.output().await?;
    }
    #[cfg(target_os = "macos")]
    {
        let mut cmd = crate::core::process::command("/usr/bin/mdfind");
        if !folder.trim().is_empty() {
            cmd.args(["-onlyin", folder.trim()]);
        }
        cmd.args(["-name", q]);
        output = cmd.output().await?;
    }
    #[cfg(not(any(target_os = "windows", target_os = "macos")))]

View on GitHub (pinned to 8600b91f42)