MCPcopy Create free account
hub / github.com/PHPantom-dev/phpantom_lsp / resolve_from_bin_dir

Function resolve_from_bin_dir

src/formatting.rs:188–203  ·  view source on GitHub ↗

Resolve a tool binary from the Composer bin directory.

(
    binary_name: &'static str,
    workspace_root: Option<&Path>,
    bin_dir: &str,
)

Source from the content-addressed store, hash-verified

186
187/// Resolve a tool binary from the Composer bin directory.
188fn resolve_from_bin_dir(
189 binary_name: &'static str,
190 workspace_root: Option<&Path>,
191 bin_dir: &str,
192) -> Option<ResolvedTool> {
193 let root = workspace_root?;
194 let candidate = root.join(bin_dir).join(binary_name);
195 if candidate.is_file() {
196 Some(ResolvedTool {
197 name: binary_name,
198 path: candidate,
199 })
200 } else {
201 None
202 }
203}
204
205// ── Built-in formatter ──────────────────────────────────────────────
206

Callers 1

resolve_strategyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected