Skip to content

Commit

Permalink
Add extra dirs to search for bridge clients
Browse files Browse the repository at this point in the history
  • Loading branch information
bayk committed Oct 1, 2024
1 parent 240afb3 commit 30d7a58
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion impls/src/tor/bridge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -273,8 +273,15 @@ impl PluginClient {

/// Try to find the plugin client path
pub fn get_client_path(plugin: &str) -> Result<String, Error> {
use std::path::PathBuf;

let plugin_path = env::var_os("PATH").and_then(|path| {
env::split_paths(&path)
let mut paths: Vec<PathBuf> = env::split_paths(&path).collect();
paths.push(PathBuf::from("/Library/Apple/usr/bin"));
paths.push(PathBuf::from("/usr/local/bin"));

paths
.iter()
.filter_map(|dir| {
let full_path = dir.join(plugin);
if full_path.is_file() {
Expand Down

0 comments on commit 30d7a58

Please sign in to comment.