-
Notifications
You must be signed in to change notification settings - Fork 375
Log warning if SIP is disabled and CLI version is < 2.15.1 #2261
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
366c5f9
ab00339
db8b7f5
b6e9f31
362192c
48a0e15
67c4cdb
d67aee1
7a018e5
ee6cd5c
e10814d
c1eb43e
492f7d6
7537a3d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Large diffs are not rendered by default.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,7 +24,13 @@ import { | |
} from "./diagnostics"; | ||
import { EnvVar } from "./environment"; | ||
import { Feature, Features } from "./feature-flags"; | ||
import { checkInstallPython311, initCodeQL, initConfig, runInit } from "./init"; | ||
import { | ||
checkInstallPython311, | ||
initCodeQL, | ||
initConfig, | ||
isSipEnabled, | ||
runInit, | ||
} from "./init"; | ||
import { Language } from "./languages"; | ||
import { getActionsLogger, Logger } from "./logging"; | ||
import { parseRepositoryNwo } from "./repository"; | ||
|
@@ -467,6 +473,18 @@ async function run() { | |
} | ||
} | ||
|
||
// For CLI versions <2.15.1, build tracing caused errors in MacOS ARM machines with | ||
// System Integrity Protection (SIP) disabled. | ||
if ( | ||
!(await codeQlVersionAbove(codeql, "2.15.1")) && | ||
process.platform === "darwin" && | ||
!(await isSipEnabled(logger)) | ||
) { | ||
logger.warning( | ||
"CodeQL versions 2.15.0 and lower are not supported on MacOS ARM machines with System Integrity Protection (SIP) disabled.", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The warning mentions ARM, but you're not checking There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah yes, good point 👍 will change it to |
||
); | ||
} | ||
|
||
// From 2.16.0 the default for the python extractor is to not perform any | ||
// dependency extraction. For versions before that, you needed to set this flag to | ||
// enable this behavior (supported since 2.13.1). | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor, separate: I had to go look at the definition to remind myself whether this was
>
or>=
. Perhaps we should rename itcodeQlVersionAtLeast
or similar.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, I always double check that it's using
gte
too. I've made the change