@guidepup/setup
Version:
Setup your environment for screen-reader automation.
16 lines (15 loc) • 520 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.isSipEnabled = isSipEnabled;
const child_process_1 = require("child_process");
const errors_1 = require("../errors");
function isSipEnabled() {
let commandResult;
try {
commandResult = (0, child_process_1.execSync)("csrutil status", { encoding: "utf8" });
}
catch (e) {
throw new Error(`${errors_1.ERR_MACOS_UNABLE_TO_VERIFY_SIP}\n\n${e.message}`);
}
return commandResult.includes("enabled");
}