which

Bun

Symbol

which

function which(command: string, options?: { cwd: string; PATH: string }): null | string

Find the path to an executable, similar to typing which in your terminal. Reads the PATH environment variable unless overridden with options.PATH.

@param command

The name of the executable or script