UNPKG

setup-cpp

Version:

Install all the tools required for building and testing C++/C projects.

15 lines (11 loc) 299 B
import which from "which" let hasDnfCache: undefined | boolean = undefined export function hasDnf(): boolean { if (process.platform !== "linux") { return false } if (hasDnfCache === undefined) { hasDnfCache = which.sync("dnf", { nothrow: true }) !== null } return hasDnfCache }