@jahed/terraform
Version:
A wrapper which downloads and runs Terraform locally via npm.
21 lines (20 loc) • 645 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getPlatform = void 0;
const promises_1 = require("@jahed/promises");
const getPlatform = () => {
return (0, promises_1.resolveNullable)({
aix: null,
darwin: "darwin",
freebsd: "freebsd",
linux: "linux",
openbsd: "openbsd",
sunos: "solaris",
win32: "windows",
android: null,
cygwin: null,
netbsd: null,
haiku: null,
}[process.platform], (0, promises_1.reason)(`"${process.platform}" platform is not supported by terraform.`));
};
exports.getPlatform = getPlatform;