UNPKG

@reliverse/rse-sdk

Version:

@reliverse/rse-sdk without cli. @reliverse/rse-sdk allows you to create new plugins for @reliverse/rse CLI, interact with reliverse.org, and even extend your own CLI functionality (you may also try @reliverse/dler-sdk for this case).

15 lines (14 loc) 379 B
import { execa } from "execa"; export async function commandExists(command) { try { const isWindows = process.platform === "win32"; if (isWindows) { const result2 = await execa("where", [command]); return result2.exitCode === 0; } const result = await execa("which", [command]); return result.exitCode === 0; } catch { return false; } }