Skip to content

Commit

Permalink
Python-Setup: run auto_install_packages.py with -B flag
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Arthur Baars committed Jun 27, 2022
1 parent 95673cf commit 11a46b8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -253,11 +253,14 @@ export async function installPythonDeps(codeql: CodeQL, logger: Logger) {
if (process.platform === "win32") {
await new toolrunner.ToolRunner(await safeWhich.safeWhich("py"), [
"-3",
"-B",
path.join(scriptsFolder, script),
path.dirname(codeql.getPath()),
]).exec();
} else {
await new toolrunner.ToolRunner(path.join(scriptsFolder, script), [
await new toolrunner.ToolRunner(await safeWhich.safeWhich("python3"), [
"-B",
path.join(scriptsFolder, script),
path.dirname(codeql.getPath()),
]).exec();
}
Expand Down

0 comments on commit 11a46b8

Please sign in to comment.