UNPKG

setup-cpp

Version:

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

16 lines (12 loc) 350 B
import which from "which" let isArchCache: undefined | boolean = undefined export function isArch(): boolean { if (process.platform !== "linux") { return false } if (isArchCache === undefined) { // detect arch by checking if pacman exists isArchCache = which.sync("pacman", { nothrow: true }) !== null } return isArchCache }