mirror of
https://github.com/github/codeql-action.git
synced 2026-05-08 14:50:21 +00:00
Disable SIP disablement check
This commit is contained in:
Generated
-31
@@ -85706,9 +85706,6 @@ function getErrorMessage(error2) {
|
||||
}
|
||||
async function checkDiskUsage(logger) {
|
||||
try {
|
||||
if (process.platform === "darwin" && (process.arch === "arm" || process.arch === "arm64") && !await checkSipEnablement(logger)) {
|
||||
return void 0;
|
||||
}
|
||||
const diskUsage = await checkDiskSpace(
|
||||
getRequiredEnvParam("GITHUB_WORKSPACE")
|
||||
);
|
||||
@@ -85751,34 +85748,6 @@ function checkActionVersion(version, githubVersion) {
|
||||
function cloneObject(obj) {
|
||||
return JSON.parse(JSON.stringify(obj));
|
||||
}
|
||||
async function checkSipEnablement(logger) {
|
||||
if (process.env["CODEQL_ACTION_IS_SIP_ENABLED" /* IS_SIP_ENABLED */] !== void 0 && ["true", "false"].includes(process.env["CODEQL_ACTION_IS_SIP_ENABLED" /* IS_SIP_ENABLED */])) {
|
||||
return process.env["CODEQL_ACTION_IS_SIP_ENABLED" /* IS_SIP_ENABLED */] === "true";
|
||||
}
|
||||
try {
|
||||
const sipStatusOutput = await exec.getExecOutput("csrutil status");
|
||||
if (sipStatusOutput.exitCode === 0) {
|
||||
if (sipStatusOutput.stdout.includes(
|
||||
"System Integrity Protection status: enabled."
|
||||
)) {
|
||||
core3.exportVariable("CODEQL_ACTION_IS_SIP_ENABLED" /* IS_SIP_ENABLED */, "true");
|
||||
return true;
|
||||
}
|
||||
if (sipStatusOutput.stdout.includes(
|
||||
"System Integrity Protection status: disabled."
|
||||
)) {
|
||||
core3.exportVariable("CODEQL_ACTION_IS_SIP_ENABLED" /* IS_SIP_ENABLED */, "false");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return void 0;
|
||||
} catch (e) {
|
||||
logger.warning(
|
||||
`Failed to determine if System Integrity Protection was enabled: ${e}`
|
||||
);
|
||||
return void 0;
|
||||
}
|
||||
}
|
||||
async function cleanUpGlob(glob, name, logger) {
|
||||
logger.debug(`Cleaning up ${name}.`);
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user