Skip to content

which

which(cmd: string, path?: string): Promise<string | null>

Defined in: packages/pythonlib/src/shutil.node.ts:188

Return the path to an executable which would be run if the given cmd was called.

Parameters

ParameterTypeDescription
cmdstringCommand name to find
path?stringOptional PATH string to search (defaults to process.env.PATH)

Returns

Promise<string | null>

Path to the executable, or null if not found