Skip to content

Function: ensure()

ensure(name, url, options?): Promise<BinContext>

Return an existing executable or install it atomically under $HOME/.<name>/bin/<name>. Installation uses a check-lock-check-load sequence so concurrent callers resolve and download the binary only once. The downloaded candidate and final renamed executable must both pass the same executable and version checks.

string

BinUrl

BinOptions = {}

Promise<BinContext>