From e6b2c0d6b892bc0bc7d8b4b79d9b426e8758bead Mon Sep 17 00:00:00 2001 From: Rasmus Wriedt Larsen Date: Mon, 8 Apr 2024 10:44:12 +0200 Subject: [PATCH] Python: suppress dependency extraction warning See https://github.com/github/codeql/pull/16127 (which will be released as part of 2.17.1) --- src/init-action.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/init-action.ts b/src/init-action.ts index a0d7a9d23..555efa163 100644 --- a/src/init-action.ts +++ b/src/init-action.ts @@ -444,8 +444,14 @@ async function run() { // before that, you needed to set this flag to enable this behavior (supported since // 2.13.1). Since dependency installation is no longer supported in the action, we - if (await codeQlVersionAbove(codeql, "2.16.0")) { - // do nothing + if (await codeQlVersionAbove(codeql, "2.17.1")) { + // disabled by default, no warning + } else if (await codeQlVersionAbove(codeql, "2.16.0")) { + // disabled by default, prints warning if environment variable is not set + core.exportVariable( + "CODEQL_EXTRACTOR_PYTHON_DISABLE_LIBRARY_EXTRACTION", + "true", + ); } else if (await codeQlVersionAbove(codeql, "2.13.1")) { core.exportVariable( "CODEQL_EXTRACTOR_PYTHON_DISABLE_LIBRARY_EXTRACTION",