{"id":"a607968ccea22cd7","repo":"BurntSushi/ripgrep","slug":"could-not-find-executable-in-path","errorCode":null,"errorMessage":"{}: could not find executable in PATH","messagePattern":"(.+?): could not find executable in PATH","errorType":"console","errorClass":"CommandError","httpStatus":null,"severity":"error","filePath":"crates/cli/src/decompress.rs","lineNumber":487,"sourceCode":"    for syspath in env::split_paths(&syspaths) {\n        if syspath.as_os_str().is_empty() {\n            continue;\n        }\n        let abs_prog = syspath.join(prog);\n        if is_exe(&abs_prog) {\n            return Ok(abs_prog.to_path_buf());\n        }\n        if abs_prog.extension().is_none() {\n            for extension in [\"com\", \"exe\"] {\n                let abs_prog = abs_prog.with_extension(extension);\n                if is_exe(&abs_prog) {\n                    return Ok(abs_prog.to_path_buf());\n                }\n            }\n        }\n    }\n    let msg = format!(\"{}: could not find executable in PATH\", prog.display());\n    return Err(CommandError::io(io::Error::new(io::ErrorKind::Other, msg)));\n}\n\nfn default_decompression_commands() -> Vec<DecompressionCommand> {\n    const ARGS_GZIP: &[&str] = &[\"gzip\", \"-d\", \"-c\"];\n    const ARGS_BZIP: &[&str] = &[\"bzip2\", \"-d\", \"-c\"];\n    const ARGS_XZ: &[&str] = &[\"xz\", \"-d\", \"-c\"];\n    const ARGS_LZ4: &[&str] = &[\"lz4\", \"-d\", \"-c\"];\n    const ARGS_LZMA: &[&str] = &[\"xz\", \"--format=lzma\", \"-d\", \"-c\"];\n    const ARGS_BROTLI: &[&str] = &[\"brotli\", \"-d\", \"-c\"];\n    const ARGS_ZSTD: &[&str] = &[\"zstd\", \"-q\", \"-d\", \"-c\"];\n    const ARGS_UNCOMPRESS: &[&str] = &[\"uncompress\", \"-c\"];\n\n    fn add(glob: &str, args: &[&str], cmds: &mut Vec<DecompressionCommand>) {\n        let bin = match resolve_binary(Path::new(args[0])) {\n            Ok(bin) => bin,\n            Err(err) => {\n                log::debug!(\"{}\", err);\n                return;","sourceCodeStart":469,"sourceCodeEnd":505,"githubUrl":"https://github.com/BurntSushi/ripgrep/blob/3fce3b5bb0236da2df6d99672afb8a719642eca7/crates/cli/src/decompress.rs#L469-L505","documentation":"Error \"{}: could not find executable in PATH\" thrown in BurntSushi/ripgrep.","triggerScenarios":"Thrown at crates/cli/src/decompress.rs:487 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Install the named decompression executable (e.g. gzip, xz, zstd) and ensure it is on PATH","Use a search mode that does not require the missing decompression helper"],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"analyzedSha":"3fce3b5bb0236da2df6d99672afb8a719642eca7","analyzedAt":"2026-08-06T01:39:05.073Z","schemaVersion":2}