findCommand
View as Markdownfunction findCommand(cmd, o?): Promise<string | null>;Defined in: node/exe.ts:90
The file a shell would run for cmd, without starting one. POSIX: an executable file in a PATH
folder. Windows: every PATH folder in order (quoted entries allowed), trying PATHEXT with .exe
first; only names with a PATHEXT extension are found (as CreateProcess would), never an
extensionless file. A command containing a path separator must be absolute and is never searched;
relative PATH entries (e.g. .) are skipped, so nothing is looked up in the current directory.
Null when nothing is found.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
cmd |
string |
o? |
Omit<ResolveOptions, "execPath"> |
Returns
Section titled “Returns”Promise<string | null>