Skip to content

Commit 11a46b8

Browse files
committed
Python-Setup: run auto_install_packages.py with -B flag
This avoids creating a __pycache__ folder in the _actions folder, which may cause file ownership problems on self-hosted runners when run in a docker container.
1 parent 95673cf commit 11a46b8

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/init.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,11 +253,14 @@ export async function installPythonDeps(codeql: CodeQL, logger: Logger) {
253253
if (process.platform === "win32") {
254254
await new toolrunner.ToolRunner(await safeWhich.safeWhich("py"), [
255255
"-3",
256+
"-B",
256257
path.join(scriptsFolder, script),
257258
path.dirname(codeql.getPath()),
258259
]).exec();
259260
} else {
260-
await new toolrunner.ToolRunner(path.join(scriptsFolder, script), [
261+
await new toolrunner.ToolRunner(await safeWhich.safeWhich("python3"), [
262+
"-B",
263+
path.join(scriptsFolder, script),
261264
path.dirname(codeql.getPath()),
262265
]).exec();
263266
}

0 commit comments

Comments
 (0)