Download src/infra/binaries.ts from Darochin/openskynet: direct link, hf CLI and curl.
- Browser
- Download file 457 Bytes
-
https://huggingface.co/Darochin/openskynet/resolve/7e708f8da03fdeb42cb747523f87d1bed5cd0805/src/infra/binaries.ts
- Command line
-
hf download hf://Darochin/openskynet@7e708f8da03fdeb42cb747523f87d1bed5cd0805/src/infra/binaries.ts
-
curl -L -o binaries.ts https://huggingface.co/Darochin/openskynet/resolve/7e708f8da03fdeb42cb747523f87d1bed5cd0805/src/infra/binaries.ts
457 Bytes
| import { runExec } from "../process/exec.js"; | |
| import { defaultRuntime, type RuntimeEnv } from "../runtime.js"; | |
| export async function ensureBinary( | |
| name: string, | |
| exec: typeof runExec = runExec, | |
| runtime: RuntimeEnv = defaultRuntime, | |
| ): Promise<void> { | |
| // Abort early if a required CLI tool is missing. | |
| await exec("which", [name]).catch(() => { | |
| runtime.error(`Missing required binary: ${name}. Please install it.`); | |
| runtime.exit(1); | |
| }); | |
| } | |