Fwhich
Bun

function

which

function which(
command: string,
options?: WhichOptions
): 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 to find

@param options

Options for the search

Referenced types

interface WhichOptions

  • cwd?: string

    When given a relative path, use this path to join it.

  • PATH?: string

    Overrides the PATH environment variable