deno_which

deno doc

Finds the path to the specified command.

import { which, whichSync } from "https://deno.land/x/which/mod.ts";

const pathToCurl = await which("curl");