{"record":{"id":"5230579a7ea54112","repo":"vectordotdev/vector","slug":"no-ability-to-glob","errorCode":null,"errorMessage":"No ability to glob","messagePattern":"No ability to glob","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/config/loading/mod.rs","lineNumber":105,"sourceCode":"        .into_iter()\n        .flat_map(|(paths, format)| paths.iter().cloned().map(move |path| (path, format)))\n}\n\n/// Expand a list of paths (potentially containing glob patterns) into real\n/// config paths, replacing it with the default paths when empty.\npub fn process_paths(config_paths: &[ConfigPath]) -> Option<Vec<ConfigPath>> {\n    let starting_paths = if !config_paths.is_empty() {\n        config_paths.to_owned()\n    } else {\n        default_config_paths()\n    };\n\n    let mut paths = Vec::new();\n\n    for config_path in &starting_paths {\n        let config_pattern: &PathBuf = config_path.into();\n\n        let matches: Vec<PathBuf> = match glob(config_pattern.to_str().expect(\"No ability to glob\"))\n        {\n            Ok(glob_paths) => glob_paths.filter_map(Result::ok).collect(),\n            Err(err) => {\n                error!(message = \"Failed to read glob pattern.\", path = ?config_pattern, error = ?err);\n                return None;\n            }\n        };\n\n        if matches.is_empty() {\n            error!(message = \"Config file not found in path.\", path = ?config_pattern, internal_log_rate_limit = false);\n            std::process::exit(exitcode::CONFIG);\n        }\n\n        match config_path {\n            ConfigPath::File(_, format) => {\n                for path in matches {\n                    paths.push(ConfigPath::File(path, *format));\n                }","sourceCodeStart":87,"sourceCodeEnd":123,"githubUrl":"https://github.com/vectordotdev/vector/blob/0d4ab78a4f0d9c9e5d03a50108a2ae4d2f4b2460/src/config/loading/mod.rs#L87-L123","documentation":"`process_paths` converts each config path (possibly a glob pattern) to `&str` for the `glob` crate. A `PathBuf` that is not valid UTF-8 makes `to_str()` return None, so the expect panics with \"No ability to glob\". The glob crate requires string patterns.","triggerScenarios":"Passing a config path containing non-UTF-8 bytes (e.g. `-c` argument built from raw OS bytes) to `process_paths`.","commonSituations":"Config filenames created with unusual encodings or control characters; paths supplied programmatically from `OsString` values on systems with non-UTF-8 locales.","solutions":["Rename the config file/path so it contains only valid UTF-8 characters.","Pass the path with proper encoding, e.g. quote it in the shell rather than embedding raw bytes.","Check `locale` settings if filenames appear garbled in your environment."],"exampleFix":"// before\nvector --config $'bad\\xffname.yaml'   // panics: No ability to glob\n// after\nmv $'bad\\xffname.yaml' badname.yaml && vector --config badname.yaml","handlingStrategy":"validation","validationCode":"if path.to_str().is_none() {\n    eprintln!(\"config path is not valid UTF-8: {:?}\", path);\n    std::process::exit(2);\n}","typeGuard":"fn is_utf8_path(p: &std::path::Path) -> bool { p.to_str().is_some() }","tryCatchPattern":"match std::fs::read_to_string(&path) { Err(_) => eprintln!(\"cannot read config path {:?} — is it valid UTF-8?\", path), Ok(_) => {} }","preventionTips":["Keep config filenames ASCII/UTF-8 only.","Avoid passing raw OsString byte paths into vector's CLI.","Verify filenames with `ls | grep -P '[^\\x00-\\x7F]'` before deployment."],"tags":["filesystem","glob","encoding"],"backgroundTag":"invalid-argument-format","analyzedSha":"0d4ab78a4f0d9c9e5d03a50108a2ae4d2f4b2460","analyzedAt":"2026-09-16T02:53:35.741Z","contentChangedAt":"2026-09-16T02:53:35.741Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}