Skip to main content

Get the path to an executable bin file

还没翻译译自英文(bun.com)本页 3 段都还没译

Bun.which finds the absolute path of an executable file, like the which command on Unix-like systems.

Bun.which("sh"); // => "/bin/sh"
Bun.which("notfound"); // => null
Bun.which("bun"); // => "/home/user/.bun/bin/bun"

See Bun.which.

Traducción © 2026 fanyi.dev · Original © 2026 the Bun project (LICENSE.md names no copyright holder) (MIT)