Skip to content

Commit 669c610

Browse files
committed
Add a feature flag to turn this off for newer versions of codeql
1 parent 028bacb commit 669c610

File tree

7 files changed

+18
-9
lines changed

7 files changed

+18
-9
lines changed

.github/workflows/python312-windows.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
version: default
3131

3232
- name: Initialize CodeQL
33-
uses: ./../init
33+
uses: ./../action/init
3434
with:
3535
tools: latest
3636
languages: python

lib/init-action.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/init-action.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/init.js

Lines changed: 4 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/init.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/init-action.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ async function run() {
283283
logger,
284284
);
285285

286-
await checkInstallPython311(config.languages);
286+
await checkInstallPython311(config.languages, codeql);
287287

288288
if (
289289
config.languages.includes(Language.python) &&

src/init.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,8 +186,15 @@ function processError(e: any): Error {
186186
* If we are running python 3.12+ on windows, we need to switch to python 3.11.
187187
* This check happens in a powershell script.
188188
*/
189-
export async function checkInstallPython311(languages: Language[]) {
190-
if (languages.includes(Language.python) && process.platform === "win32") {
189+
export async function checkInstallPython311(
190+
languages: Language[],
191+
codeql: CodeQL,
192+
) {
193+
if (
194+
languages.includes(Language.python) &&
195+
process.platform === "win32" &&
196+
!(await codeql.getVersion()).features?.supportsPython312
197+
) {
191198
const script = path.resolve(
192199
__dirname,
193200
"../python-setup",

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy