Skip to content

Function: ensure()

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

Return an existing executable or install it atomically under $HOME/.<name>/bin/<name>. Multi-file package mode atomically preserves the unpacked package at an explicit destination root. Installation uses a check-lock-check-load sequence so concurrent callers resolve and download only once. Candidates and final destinations must pass the same checks.

string

BinUrl

BinOptions = {}

Promise<BinContext>