(
runtime_root: Option<&Path>,
command: &str,
direct_executable_exists: bool,
)
| 245 | } |
| 246 | |
| 247 | fn npm_exec_fallback_for_command( |
| 248 | runtime_root: Option<&Path>, |
| 249 | command: &str, |
| 250 | direct_executable_exists: bool, |
| 251 | ) -> Option<PathBuf> { |
| 252 | if direct_executable_exists || !matches!(command, "yarn" | "pnpm") { |
| 253 | return None; |
| 254 | } |
| 255 | |
| 256 | let npm_path = |
| 257 | selected_existing_or_primary(&runtime_executable_candidate_paths(runtime_root?, "npm")); |
| 258 | |
| 259 | runtime_executable_is_runnable(&npm_path).then_some(npm_path) |
| 260 | } |
| 261 | |
| 262 | fn availability_mode( |
| 263 | direct_executable_runnable: bool, |
no test coverage detected