Skip to content

@pumpkin-plugins/static-hermes-runtime API / hermes/toolchain-paths / findExecutable

Function: findExecutable() ​

findExecutable(name, environment?, platform?): string | undefined

Defined in: hermes/toolchain-paths.ts:63

Find a Rust tool on PATH, accounting for the Windows executable suffix.

Parameters ​

name ​

string

Tool name such as cargo or rustup.

environment? ​

ProcessEnv = process.env

Environment containing the PATH to search.

platform? ​

Platform = process.platform

Host platform; defaults to the current process platform.

Returns ​

string | undefined

The matching executable path, or undefined when it is not on PATH.

pumpkin-plugins documentation