fix: prevent redundant plugin path checks for /usr/bin directory
Release / check-release (push) Successful in 21s
Release / build (push) Skipped
Release / package (deb) (push) Skipped
Release / package (rpm) (push) Skipped
Release / publish (push) Skipped
CI / test (push) Successful in 1m41s

This commit is contained in:
Elias Wendland
2026-07-17 21:15:59 +02:00
parent c4982665a6
commit 6c88f618cf
+5 -2
View File
@@ -137,8 +137,11 @@ impl PluginRegistry {
Ok(executable) => {
tracing::trace!(executable = %executable.display(), "resolved current executable");
if let Some(parent) = executable.parent() {
directories.push(parent.to_path_buf());
directories.push(parent.join("plugins"));
// Avoids checking the entire /usr/bin folder on every runtime, since there will never be a lib file there
if parent.to_path_buf() != PathBuf::from("/usr/bin") {
directories.push(parent.to_path_buf());
directories.push(parent.join("plugins"));
}
}
}
Err(error) => tracing::debug!(%error, "could not resolve current executable"),