* Builds an absolute candidate path for one PATH entry and command name.
( directory: string, command: string, cwd: string )
| 269 | * Builds an absolute candidate path for one PATH entry and command name. |
| 270 | */ |
| 271 | function getPathCommandCandidate( |
| 272 | directory: string, |
| 273 | command: string, |
| 274 | cwd: string |
| 275 | ): string { |
| 276 | const candidateDirectory = path.isAbsolute(directory) |
| 277 | ? directory |
| 278 | : path.resolve(cwd, directory); |
| 279 | |
| 280 | return path.join(candidateDirectory, command); |
| 281 | } |
| 282 | |
| 283 | /** |
| 284 | * PATH probing treats absent candidates as normal. Permission failures are only |
no test coverage detected