{"record":{"id":"7e867589766e5db8","repo":"tonhowtf/omniget","slug":"everything-es-exe-nao-encontrado","errorCode":null,"errorMessage":"Everything (es.exe) nao encontrado","messagePattern":"Everything \\(es\\.exe\\) nao encontrado","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src-tauri/omniget-core/src/core/tools/file_search.rs","lineNumber":91,"sourceCode":"#[derive(Debug, Clone, Serialize)]\npub struct Hit {\n    pub path: String,\n    pub size: Option<u64>,\n    pub is_dir: bool,\n}\n\npub async fn search(query: &str, folder: &str, limit: usize) -> anyhow::Result<Vec<Hit>> {\n    let q = query.trim();\n    if q.is_empty() {\n        return Ok(vec![]);\n    }\n    let limit = limit.clamp(1, 2000);\n    let output;\n    #[cfg(target_os = \"windows\")]\n    {\n        let es = es_path()\n            .await\n            .ok_or_else(|| anyhow!(\"Everything (es.exe) nao encontrado\"))?;\n        let mut cmd = crate::core::process::command(&es);\n        cmd.args([\"-n\", &limit.to_string()]);\n        if !folder.trim().is_empty() {\n            cmd.args([\"-path\", folder.trim()]);\n        }\n        cmd.arg(q);\n        output = cmd.output().await?;\n    }\n    #[cfg(target_os = \"macos\")]\n    {\n        let mut cmd = crate::core::process::command(\"/usr/bin/mdfind\");\n        if !folder.trim().is_empty() {\n            cmd.args([\"-onlyin\", folder.trim()]);\n        }\n        cmd.args([\"-name\", q]);\n        output = cmd.output().await?;\n    }\n    #[cfg(not(any(target_os = \"windows\", target_os = \"macos\")))]","sourceCodeStart":73,"sourceCodeEnd":109,"githubUrl":"https://github.com/tonhowtf/omniget/blob/8600b91f4246848bac346874daa9e61c1fc5677a/src-tauri/omniget-core/src/core/tools/file_search.rs#L73-L109","documentation":"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.","triggerScenarios":"Calling search() on Windows when Everything (or its es.exe CLI) is not installed, not in PATH, or not at the configured location.","commonSituations":"Fresh machine without Everything installed; Everything installed but es.exe downloaded separately and never placed in PATH; portable Everything install with no registry entry.","solutions":["Install Everything from voidtools.com and download es.exe, placing it in PATH","Verify with `es -get-result-count something` in a terminal that es.exe works","Add es.exe's folder to PATH or to the location es_path() checks, then retry"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"// windows check before searching\nlet es_available = which::which(\"es\").is_ok();","typeGuard":null,"tryCatchPattern":"match file_search::search(&q, folder, limit).await {\n    Ok(hits) => hits,\n    Err(e) if e.to_string().contains(\"es.exe\") => fallback_walk_search(&q, folder),\n    Err(e) => return Err(e),\n}","preventionTips":["Install Everything + es.exe during app onboarding on Windows","Detect es.exe availability once at startup and hide/disable the feature otherwise","Keep es.exe bundled or in a known configured path, not just PATH"],"tags":["windows","missing-dependency","file-search"],"backgroundTag":"missing-dependency","analyzedSha":"8600b91f4246848bac346874daa9e61c1fc5677a","analyzedAt":"2026-09-12T14:29:19.317Z","contentChangedAt":"2026-09-12T14:29:19.317Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}