Refactor search directory handling in resolve_daemon_executable function

- Changed the initialization of search_dirs from a vector to a mutable vector to allow for further modifications.
- This adjustment enhances the flexibility of the search directory management, particularly for non-macOS platforms.
This commit is contained in:
Steven Enamakel
2026-03-29 22:42:04 -07:00
parent 5d865fa4e2
commit ba84824ddf
+1 -1
View File
@@ -32,7 +32,7 @@ pub(crate) fn resolve_daemon_executable() -> Result<PathBuf> {
.unwrap_or_else(|| exe_dir.clone()),
];
#[cfg(not(target_os = "macos"))]
let search_dirs = vec![exe_dir.clone()];
let mut search_dirs = vec![exe_dir.clone()];
for dir in search_dirs.drain(..) {
let Ok(entries) = fs::read_dir(&dir) else {